Viewing 4 posts - 1 through 4 (of 4 total)
SELECT books.bk_no
FROM books
INNER JOIN ordered_items
ON books.bk_no = ordered_items.bk_no
GROUP BY books.bk_no
HAVING COUNT(ordered_items.bk_no)>2
This is beause you haven't included the'books.title' in your group by
What you can do is
select * from books
where...
November 23, 2007 at 6:42 pm
The relationship between those two tables are many-to-many.
You can use select * from contact join (select max(owner_id) from transactions group by owner_id) b
on contact.id = b.owner_id
You can also check...
November 23, 2007 at 6:37 pm
I agree.
Null is an very interesting data type.
a=null
b=null
if a=b then 'Yes'
Else
'No'
You will expect to get No since you cannot compare two null values.
October 24, 2007 at 3:26 am
Viewing 4 posts - 1 through 4 (of 4 total)