SQL Server 2008 R2 table query -


i have 2 tables. need execute query gets name of product has letter m in , sort these products in descending order number of ingredients have.

product table has name , product number in it, while table madefrom has ingredient number , product number in it.

something this:

select name, count(madefrom.id) product     inner join madefrom on madefrom.productid = product.id name '%m%' group name order count(madefrom.id) desc 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -