Ciao ragazzi prima di tutto vi posto la query, poi vi espongo il mio problema..
SELECTcategories.CategoryNameASCategoria,products.ProductNameASProdotto,AVG(UnitPrice)AS'Prezzo Medio'
FROM`products`
JOINcategoriesONproducts.CategoryID=categories.CategoryID
GROUPBYproducts.ProductID
ORDERBY`Prezzo Medio`ASC
LIMIT0,30
Categoria Prodotto Prezzo Medio http://localhost/phpmyadmin/themes/dot.gif Dairy Products Geitost 2.50000000 Beveranges Guaraná Fantástica 4.50000000 Seafood Konbu 6.00000000 Grains/Cereals Filo Mix 7.00000000 Meat/Poultry Tourtière 7.45000000 Beveranges Rhönbräu Klosterbier 7.75000000 Grains/Cereals Tunnbröd 9.00000000 Confections Teatime Chocolate Biscuits 9.20000000 Seafood Røgede sild 9.50000000 Confections Zaanse koeken 9.50000000 Seafood Jack's New England Clam Chowder 9.65000000 Produce Longlife Tofu 10.00000000 Condiments Aniseed Syrup 10.00000000 Confections Sir Rodney's Scones 10.00000000 Seafood Spegesild 12.00000000 Confections Scottish Longbreads 12.50000000 Dairy Products Gorgonzola Telino 12.50000000 Confections Chocolade 12.75000000 Condiments Original Frankfurter grüne Soße 13.00000000 Seafood Escargots de Bourgogne 13.25000000 Confections NuNuCa Nuß-Nougat-Creme 14.00000000 Beveranges Sasquatch Ale 14.00000000 Beveranges Laughing Lumberjack Lager 14.00000000 Grains/Cereals Singaporean Hokkien Fried Mee 14.00000000 Seafood Röd Kaviar 15.00000000 Beveranges Outback Lager 15.00000000 Condiments Genen Shouyu 15.50000000 Confections Valkoinen suklaa 16.25000000 Condiments Louisiana Hot Spiced Okra 17.00000000 Confections Pavlova 17.45000000
Quello che ottengo, è quello che voglio...in parte. Il mio obiettivo è prendere solo le righe di 'Condiments' nella tabella 'Categoria'. Come faccio?