SQL QuestSQL Interview Questions › Querying Basics

Distinct Charter Classes

EasyFreeQuerying Basics

The bank_class column codes a bank's regulatory charter type (N=National, SM=State Member, NM=State Non-Member, etc). List all distinct bank classes present in the institutions table. Order alphabetically.

Solve it in the browser editor →

Runs on SQLite in your browser, graded against the expected result, no signup. A wrong answer gets a diagnosis, not just "incorrect".

Schema

institutions

certnamecitystatezipcharter_classestablished_datetotal_assetstotal_depositstotal_equityoffice_countbank_class
628JPMorgan Chase Bank, National AssociationColumbusOH43240801/01/1824375266200026978420003359360005335N
3510Bank of America, National AssociationCharlotteNC282021304410/17/1904263682300021019680002462500003840N
7213Citibank, National AssociationSioux FallsSD57108146106/16/181218364360001465300000176530000958N

Expected output: Distinct codes one per row

Hint

SELECT DISTINCT bank_class.

Concepts

SELECT DISTINCT ORDER BY

Practise the topic: SQL practice questions

In these company practice sets

JPMorgan

A SQL Quest challenge matched to patterns reported for these companies — not a question any of them has published.

Related questions

Your First QueryEasy · FreePick Your ColumnsEasy · FreeFilter with WHEREEasy · FreeComparison OperatorsEasy · FreeMultiple Conditions (AND / OR)Easy · FreeThe IN OperatorEasy · Free

Where would this cost you points in an interview?

Ten questions, no signup: a Skillmap across nine SQL skills and the one to fix first.

Take the readiness test