Came up with another solution that seem to work. Maybe not as elegant.
SELECT name
FROM(
SELECT name, COUNT(size) AS sizes
FROM(
SELECT s.name, t.size
FROM Store AS s, StoreTshirt AS st, Tshirt AS t
WHERE s.sid=st.stor AND st.tshirt=t.tid
GROUP BY s.name, t.size
)...
Actually, disregard the previously posted SQL code. This is more to the point:
Below is the part where I try to find out how many different sizes of tshirts are in every store.
SELECT s.name, COUNT(t.size) AS sizes
FROM Store AS s, StoreTshirt AS st, Tshirt AS s
WHERE s.sid=st.store AND...
PHV:
Well I haven't gotten as far as a single working SQL statement yet but the method I want to use is counting the number of unique sizes of Tshirts for every store and comparing with the count of rows in the table "Size". This is where I'm at currently (obviosly not complete):
SELECT s.name...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.