where do we store pre-saved queries?
Templates
Name 3 Arithmetic Operators.
> ,< +,-,>=,<=
Write a query to print 10 merchant id's.
select merchant_id from usertables.advikn_s2s
limit 10
select from fact.payouts
*
What would be the best way of sharing query?
Permalink
Name 2 data types in SQL
Int, Varchar, Date, Bigint , Booleans
write a query to print unique Biz countries.
select distinct(biz_country) from usertables.advikn_s2s
select * where id='acct_123xyz' from fact.payments
where condition should be after select statement
Where do we find previously ran queries by individuals?
Query History
Blank field holds what value?
Null
write a query to print all the data where business_url is empty.
select * from usertables.advikn_s2s
where business_url is null
select * from table_xyz
where amount='300'
Amount should be always integer or Biginteger, it shouldn't be in String
where we can find column names involved in any table without running a query?
Explore / Documentation
Name 3 aggregate functions.
sum, Min, avg, Max, Count
write a query to print all the merchant data which are created in year 2024
select * from usertables.advikn_s2s
where created_at >= date '2024-01-01'
select * from table_xyz
where id='acct_xyz' amount=500
AND condition is missing
What Is the shortcut to run the query?
Cmd+Return
which Keyword is often used with aggregate function?
Group By
write a query to fetch number of merchants created in 2023.
select count(*) from usertables.advikn_s2s
where
created between date '2023-01-01' and date '2023-12-31'
select date, sum(amount) from table_xyz
order by date desc
Group By Date is missing