hi guys..
i have a select statement which goes like this
Basically this returns nearly what i want.
The only extra thing is i want to be able to do is add the frequency field of the 3 selects and return it. At the moment it returns the frequency field for the 1st select.
eg. if the frequency field for the 3 resulting selects are
1,3,4 i would like it to return 8 instead of returning 1
Thanks in advance
i have a select statement which goes like this
Code:
SELECT l.id,o.frequency,o.frequency as freq1, l.name, l.url, l.description FROM links l, object_word_link o, word w WHERE l.id=o.object_id AND w.id=o.word_id AND ( lower(l.name || l.keywords) like '%melbourne%' AND lower(l.name || l.keywords) like '%arts%' ) AND ( lower(w.word) = 'melbourne') AND ( ( w.object_count / 7366 ) < 0.7 )
intersect
SELECT l.id,o.frequency, o.frequency as freq2,l.name, l.url, l.description FROM links l, object_word_link o, word w WHERE l.id=o.object_id AND w.id=o.word_id AND ( lower(w.word) = 'arts') AND ( ( w.object_count / 7366 ) < 0.7 )
intersect
SELECT l.id,o.frequency, o.frequency as freq3,l.name, l.url, l.description FROM links l, object_word_link o, word w WHERE l.id=o.object_id AND w.id=o.word_id AND ( lower(w.word) = 'citysearch') AND ( ( w.object_count / 7366 ) < 0.7 )
Basically this returns nearly what i want.
The only extra thing is i want to be able to do is add the frequency field of the 3 selects and return it. At the moment it returns the frequency field for the 1st select.
eg. if the frequency field for the 3 resulting selects are
1,3,4 i would like it to return 8 instead of returning 1
Thanks in advance