how to use the order by and aggregate function together in sql query
Posted
by Ranjana
on Stack Overflow
See other posts from Stack Overflow
or by Ranjana
Published on 2010-05-14T10:59:52Z
Indexed on
2010/05/14
11:04 UTC
Read the original article
Hit count: 328
SELECT count(distinct req.requirementid), req.requirementid, org.organizationid,req. locationofposting,org.registereddate FROM OrganizationRegisteredDetails AS org, RequirementsDetailsforOrganization AS req WHERE org.organizationid =req.requirementid order by org.RegisteredDate desc
this shows me the error :
Column 'RequirementsDetailsforOrganization.RequirementID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
how to do the 'order by org.RegisteredDate desc' in this Query ....
© Stack Overflow or respective owner