oracle:sql:count
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
oracle:sql:count [2021/08/08 18:05] – peter | oracle:sql:count [2021/08/08 18:07] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Oracle - SQL - Count ====== | ====== Oracle - SQL - Count ====== | ||
+ | |||
+ | [[Oracle: | ||
[[Oracle: | [[Oracle: | ||
- | |||
- | A query can be wrapped in another SELECT: | ||
- | |||
- | <code sql> | ||
- | select count(*) | ||
- | from | ||
- | ( | ||
- | select count(SID) tot -- add alias | ||
- | from Test | ||
- | where Date = ' | ||
- | group by SID | ||
- | ) | ||
- | |||
- | select count(*) | ||
- | from | ||
- | (Select COLUMNS | ||
- | from SCHEMA.TABLE | ||
- | where nvl(TRADING_BRANCH||TRADING_ACCOUNT, | ||
- | |||
- | |||
- | select column_name, | ||
- | from table | ||
- | group by column_name | ||
- | having count (column_name) > 1; | ||
- | </ | ||
oracle/sql/count.1628445950.txt.gz · Last modified: 2021/08/08 18:05 by peter