Ad
Code
Diff
  • -- Code Here
    
    select 
      city_name, 
      sum(confirmed_cases) confirmed_cases , 
      sum(recovered_cases) recovered_cases, 
      sum(death_cases) death_cases
    from cases
      join dati
        on dati.code = cases.dati_code
    group by city_name
    order by confirmed_cases desc
    
      
    • --- Code Here
    • -- Code Here
    • select
    • city_name,
    • sum(confirmed_cases) confirmed_cases ,
    • sum(recovered_cases) recovered_cases,
    • sum(death_cases) death_cases
    • from cases
    • join dati
    • on dati.code = cases.dati_code
    • group by city_name
    • order by confirmed_cases desc
Code
Diff
  • -- Code Here
    select * 
    from employees
    order by salary desc
    limit 10
    • --- Code Here
    • -- Code Here
    • select *
    • from employees
    • order by salary desc
    • limit 10
Code
Diff
  • -- Code Here
    
    select * 
    from transactions
    where customer is not null
    order by store, total_price desc
    • --- Code Here
    • -- Code Here
    • select *
    • from transactions
    • where customer is not null
    • order by store, total_price desc
Code
Diff
  • -- Code Here
    select * 
    from transactions
    order by total_price 
    • --- Code Here
    • -- Code Here
    • select *
    • from transactions
    • order by total_price
Code
Diff
  • -- Code Here
    select * 
    from transactions
    where customer like 'S%'
    and customer like '%r'
    • --- Code Here
    • -- Code Here
    • select *
    • from transactions
    • where customer like 'S%'
    • and customer like '%r'
Code
Diff
  • -- Code Here
    select *
    from transactions
    where customer is not null
    • --- Code Here
    • -- Code Here
    • select *
    • from transactions
    • where customer is not null
Code
Diff
  • -- Code Here
    select * 
    from transactions
    where customer is null
    • --- Code Here
    • -- Code Here
    • select *
    • from transactions
    • where customer is null
Code
Diff
  • -- Code Here
    select * 
    from  
      transactions
    where store not in ('BIE Store Jakarta', 'BIE Store Bandung')
    • --- Code Here
    • -- Code Here
    • select *
    • from
    • transactions
    • where store not in ('BIE Store Jakarta', 'BIE Store Bandung')
Code
Diff
  • -- Code Here
    select * 
    from 
      transactions
    where store in ('BIE Store Bandung','BIE Store Palembang','BIE Store Malang')
    • --- Code Here
    • -- Code Here
    • select *
    • from
    • transactions
    • where store in ('BIE Store Bandung','BIE Store Palembang','BIE Store Malang')
Code
Diff
  • -- Code Here
    
    select 
      date, store, total_price
    from
      transactions
    where
      date between '2022-01-01' and '2022-01-03'
    • --- Code Here
    • -- Code Here
    • select
    • date, store, total_price
    • from
    • transactions
    • where
    • date between '2022-01-01' and '2022-01-03'
Code
Diff
  • -- Code Here
    
    select * from transactions
    where store = 'BIE Store Bandung'
    and total_price <= 100000
    • --- Code Here
    • -- Code Here
    • select * from transactions
    • where store = 'BIE Store Bandung'
    • and total_price <= 100000
Code
Diff
  • -- Code here
    select * from customers
    where kota = 'Tasikmalaya'
    • --- Code here
    • -- Code here
    • select * from customers
    • where kota = 'Tasikmalaya'
Code
Diff
  • -- Code Here
    select name as nama, age as umur from customers
    • --- Code Here
    • -- Code Here
    • select name as nama, age as umur from customers
Code
Diff
  • -- Code Here
    select name, age from customers
    • --- Code Here
    • -- Code Here
    • select name, age from customers
Code
Diff
  • -- Code here
    SELECT * FROM customers
    
    • -- Code here
    • SELECT * FROM customers