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.

Example of the Scala aggregate function

I have been looking and I cannot find an example or discussion of the aggregate function in Scala that I …

scala aggregate-functions
Aggregate function in MySQL - list (like LISTAGG in Oracle)

I need function, that returns list of strings. I have data in table like this: Id MyString ------------------------ 1 First 2 Second 3 …

mysql aggregate-functions
How to count NULL values in MySQL?

I want to know how can i find all the values that are NULL in the MySQL database for example …

mysql aggregate-functions
Spark SQL replacement for MySQL's GROUP_CONCAT aggregate function

I have a table of two string type columns (username, friend) and for each username, I want to collect all …

apache-spark aggregate-functions apache-spark-sql
Why are aggregate functions not allowed in where clause

I am looking for clarification on this. I am writing two queries below: We have a table of employee name …

sql oracle aggregate-functions
How to define and use a User-Defined Aggregate Function in Spark SQL?

I know how to write a UDF in Spark SQL: def belowThreshold(power: Int): Boolean = { return power < -40 } sqlContext.…

scala apache-spark apache-spark-sql aggregate-functions user-defined-functions
Postgres - aggregate two columns into one item

I would like to aggregate two columns into one "array" when grouping. Assume a table like so: friends_map: ================================= user_…

sql arrays postgresql aggregate-functions
date_trunc 5 minute interval in PostgreSQL

Possible Duplicate: What is the fastest way to truncate timestamps to 5 minutes in Postgres? Postgresql SQL GROUP BY time interval …

sql postgresql datetime aggregate-functions
how to group by and return sum row in Postgres

I am stuck here. I have row in Postgres like this: id amount a 5000 a 1500 a 500 b 2000 b 1000 c 4000 How …

sql postgresql aggregate-functions
How can I use SUM for bit columns?

How can use the function SUM() for bit columns in T-SQL? When I try do it as below: SELECT SUM(…

sql sql-server tsql aggregate-functions