Top "Aggregate-functions" questions

Aggregate functions are a subset of SQL functions that compute a single value from multiple input rows, mostly used in `SELECT` queries with a `GROUP BY` clause.

No non-missing arguments warning when using min or max in reshape2

I get the following warning when I use min or max in the dcast function from the reshape2 package. What …

r aggregate-functions reshape2
How to avoid error "aggregate functions are not allowed in WHERE"

This sql code throws an aggregate functions are not allowed in WHERE SELECT o.ID , count(p.CAT) FROM Orders …

mysql sql aggregate-functions
count without group

I have one table named GUYS(ID,NAME,PHONE) and i need to add a count of how many guys …

sql mysql aggregate-functions
Count cumulative total in Postgresql

I am using count and group by to get the number of subscribers registered each day: SELECT created_at, COUNT(…

sql postgresql aggregate-functions
How to do a count on a union query

I have the following query: select distinct profile_id from userprofile_... union select distinct profile_id from productions_... How would …

mysql sql union aggregate-functions
Is it possible to use Aggregate function in a Select statment without using Group By clause?

So far I have written Aggregate function followed by Group By clause to find the values based on SUM, AVG …

sql sql-server sql-server-2005 group-by aggregate-functions
Aggregate SQL Function to grab only the first from each group

I have 2 tables - an Account table and a Users table. Each account can have multiple users. I have a …

sql-server-2005 tsql aggregate-functions
Group DateTime into 5,15,30 and 60 minute intervals

I am trying to group some records into 5-, 15-, 30- and 60-minute intervals: SELECT AVG(value) as "AvgValue", sample_…

sql sql-server sql-server-2008 aggregate-functions
Difference between scalar, table-valued, and aggregate functions in SQL server?

What is the difference between scalar-valued, table-valued, and aggregate functions in SQL server? And does calling them from a query …

sql-server function tsql aggregate-functions sqlclr
Oracle SQL - Sum and group data by week

I have records related to dates: DATE AMOUNT 16.03.2013 3 16.03.2013 4 16.03.2013 1 16.03.2013 3 17.03.2013 4 17.03.2014 3 I know how to sum them up for each day, but how …

sql oracle aggregate-functions