Thread: Mysql question
View Single Post
Old 11-01-2010, 02:11 PM  
BSleazy
Confirmed User
 
Industry Role:
Join Date: Aug 2002
Location: USA
Posts: 6,721
Mysql question

I'm stuck on this problem What am I doing wrong? I need it to show all the book types with their average prices.

For each type of book, list the book type and the average price. Only include paperback books.

mysql> SELECT TYPE, AVG(PRICE)
-> FROM BOOK
-> WHERE PAPERBACK = 'Y';
+------+------------+
| TYPE | AVG(PRICE) |
+------+------------+
| SFI | 10.664348 |
+------+------------+
1 row in set (0.00 sec)
__________________
icq 156131086
BSleazy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote