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.

GROUP BY + CASE statement

I have a working query that is grouping data by hardware model and a result, but the problem is there …

sql postgresql group-by case aggregate-functions
Apply multiple functions to multiple groupby columns

The docs show how to apply multiple functions on a groupby object at a time using a dict with the …

python group-by aggregate-functions pandas
How to use Oracle's LISTAGG function with a unique filter?

I have a table like this: group_id name -------- ---- 1 David 1 John 1 Alan 1 David 2 Julie 2 Charles And I want …

oracle group-by oracle11g aggregate-functions
MySQL "Group By" and "Order By"

I want to be able to select a bunch of rows from a table of e-mails and group them by …

mysql sql group-by sql-order-by aggregate-functions
Selecting a Record With MAX Value

In SQL Server 2008 I have a table CUSTOMERS that has two columns as: ID, BALANCE How can I write the …

tsql aggregate-functions
Concatenate multiple result rows of one column into one, group by another column

I'm having a table like this Movie Actor A 1 A 2 A 3 B 4 I want to get the name of a …

sql postgresql aggregate-functions
How to include "zero" / "0" results in COUNT aggregate?

I've just got myself a little bit stuck with some SQL. I don't think I can phrase the question brilliantly …

sql postgresql aggregate-functions
GROUP BY without aggregate function

I am trying to understand GROUP BY (new to oracle dbms) without aggregate function. How does it operate? Here is …

sql oracle group-by aggregate-functions
Spark SQL: apply aggregate functions to a list of columns

Is there a way to apply an aggregate function to all (or a list of) columns of a dataframe, when …

apache-spark dataframe apache-spark-sql aggregate-functions
Optimal way to concatenate/aggregate strings

I'm finding a way to aggregate strings from different rows into a single row. I'm looking to do this in …

sql sql-server azure aggregate-functions azure-sql-database