-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Prasanna Kumar edited this page Feb 3, 2023
·
6 revisions
-- Simple select
select Id from users
-- Select field alias
select EmailId as email from users
-- Select all fields
select * from users
-- Select nested map
select Id, Email, `Address.City` as city from users
-- Notice Backtick (`) when using field path
-- Select expressions
select id, (age > 100) as centenarian from users
select * from users where Id > 20
select * from users where Id > 20 AND Id > 100
select * from users where `Address.Country` = 'India'
select * from users where Id > 50 order by Id DESC
select * from users where Id > 20 order by `Address.Country` ASC
select * from users limit 15
select * from users where Id > 20 limit 15
select * from users where Id > 20 order by `Address.Country` DESC limit 15