Hi, i got the followings tables:
The table B store info from user with the various choices they made;im suppose to rank the products of table A based on the number of users having selected it.
i used the following statement to retrieve the info for a single value
Select count(ID)as 'Number',Products
where '|'+Products+'|'like '%|'+'1'+'|%'
group by Products
how can i create an optimized view that will sum then per product Id so that i can later use the ranking function on them.
View Complete Post