db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hill <Thomas.K.H...@t-online.de>
Subject Re: New developer, need a little help with a subquery
Date Tue, 26 Jul 2011 19:34:04 GMT
if I understand correctly you need a 'group by' in your query; 
so like
SELECT  day("dtmDateCompleted") as "Day", 
	"A"."strName" AS "Category", 
        COUNT(*)
  FROM "tblAssetCategory" "AC" 
       INNER JOIN "tblAsset" "A" ON "AC"."id" = "A"."intCategoryID"
       INNER JOIN "tblWorkOrder" "W" ON "W"."intAssetID" = "A"."id"
 WHERE "dtmDateCompleted" IS NOT NULL 
GROUP BY day("dtmDateCompleted"), "A"."strName"




Mime
View raw message