Hubble
Keywords
Sql Query results
Syntax Fix
100

where do we store pre-saved queries?

Templates

100

Name 3 Arithmetic Operators.

> ,< +,-,>=,<=

100

Write a query to print 10 merchant id's.

select merchant_id from usertables.advikn_s2s

limit 10

100

select  from fact.payouts

*

200

What would be the best way of sharing query?

Permalink

200

Name 2 data types in SQL

Int, Varchar, Date, Bigint , Booleans 

200

write a query to print unique Biz countries.

select distinct(biz_country)  from usertables.advikn_s2s

200

select * where id='acct_123xyz' from fact.payments 

where condition should be after select statement

300

Where do we find previously ran queries by individuals?

Query History

300

Blank field holds what value?

Null

300

write a query to print all the data where business_url is empty.

select * from usertables.advikn_s2s

where business_url is null

300

select * from table_xyz

where amount='300'


Amount should be always integer or Biginteger, it shouldn't be in String

400

where we can find column names involved in any table without running a query?

Explore / Documentation

400

Name 3 aggregate functions.

 sum, Min, avg, Max, Count

400

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'

400

select * from table_xyz

where id='acct_xyz' amount=500


AND condition is missing

500

What Is the shortcut to run the query?

Cmd+Return

500

which Keyword is often used with aggregate function?

Group By

500

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'

500

select date, sum(amount) from table_xyz

order by date desc

Group By Date is missing

M
e
n
u