I have written a query in sql that is pulling data from 3 tables. I need to create an additional column that will get a count of records in another column when the value = 'red' (fox example). I should know how to do this, but for some reason, my subquery within my select statement is not returning the output that I am looking for. See a snippet of my code below.
(select(count(LOCATION.new_skirt)) from LOCATION
where LOCATION_COLOR = 'RED')as "red skit count",
PRODUCT_ID = STORE.PRODUCT_ID,
SIZE = STORE.SHIRT_SIZE,