Re: Getting an average ..

From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 12/08/04


Date: 8 Dec 2004 02:59:06 -0800

Try this:

SELECT licence, AVG(transcount)
FROM YourTable
WHERE receiveddate >= '20040901'
AND receiveddate < '20041201'
GROUP BY licence

-- 
David Portas
SQL Server MVP
--


Relevant Pages

  • Re: SQL Selection by date
    ... If the time of ReceivedDate is always midnight then: ... WHERE recieveddate = CONVERT,CURRENT_TIMESTAMP,112) ... David Portas ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Update / Insert Query
    ... You can use an EXISTS predicate to check whether a row exists or not: ... BG, SQL Server MVP ... "Peter Newman" wrote in message ... > how can i get the following sample query to insert if 'licence' is not ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL server Licence
    ... Consult your licence about that. ... applicable outside the country in which it was purchased but there are ... SQL Server MVP ... Prev by Date: ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 2000 - Licensing Requirements for Multiple Instances
    ... Not on Enterprise Edition. ... With Standard Edition you do need a licence for ... David Portas ... SQL Server MVP ...
    (microsoft.public.sqlserver.server)