Hi guys and girls,
I've been trying to get my head around this query and can't seem to
get it right.
catalogid int IDENTITY NOT NULL,
cname varchar (255),
cstock int DEFAULT 0)
I've tried to elaborate as simply as possible...
This is for a 'music store'
Look in products table for products where artist name (cname) match
other 'cname's of the same value.
If there are more than four records with the same 'cname' then
check whether the stock(cstock) for each of the records is greater than 1.
If there are more than 4 records for an artist (cname match) and there
is 1 or more items in (cstock)stock for each of the first four records then
return a list containing the 'cname' field for each artist that
Would REALLY appreciate some help with this. My T-sql is rubbish...