I have a table with columns:
email1, email2, ... email5, domain_freqs and a function get_domain: get_domain([email protected]) = gmail.com,
I have a lookup table which has the frequencies of all the email domains occurring in all emails in the database:
word nentry
gmail.com 130879
hotmail.com 12981
...
I want to update the domain_freqs column to store an array of values pulled from the lookup table.
For example, if I have a record with:
email1 = [email protected]
email2 = [email protected]
then I want to store ARRAY[130879, 12981, NULL, NULL, NULL] in the domain_freqs column
create tablestatements for the tables in question. Formatted text please, no screen shots