Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

SELECT Statement

Syntax

SELECT List

FROM

WHERE

GROUP BY / HAVING

ORDER BY

Criteria Conditioning

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

GROUP BY Clause

Column Names from the Select List

Column Names Not in the Select List

HAVING Clause

 

Column Names From the Select List

select customer_no, sum(amount) from orders group by customer_no

select city, state, count(distinct company) from customers group by city, state

 

Column Names Not in the Select List

select status, sum(amount) from orders group by customer_no, status

select count(company) from customers group by state

 

Having

select customer_no, sum(amount) from orders
group by customer_no having customer_no = 1001

select customer_no, sum(amount) from orders
group by customer_no having status != 'shipped'

select status, sum(amount) from orders group by status having customer_no
in (select customer_no from customers where company='systems')

Top