Ad
Code
Diff
  • 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
    • 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 ASC, total_price DESC;
    • --- Code Here
    • -- Code Here
    • SELECT * FROM transactions
    • WHERE customer IS NOT NULL
    • ORDER BY store ASC, total_price DESC;
Code
Diff
  • -- Code Here
    SELECT*FROM transactions
    order by total_price DESC;
    • --- Code Here
    • -- Code Here
    • SELECT*FROM transactions
    • order by total_price DESC;
Code
Diff
  • -- Code Here
    SELECT*FROM transactions
    order by total_price ASC;
    • --- Code Here
    • -- Code Here
    • SELECT*FROM transactions
    • order by total_price ASC;
Code
Diff
  • -- Code Here
    SELECT*FROM transactions
    WHERE customer LIKE 'S%r';
    • --- Code Here
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE customer LIKE 'S%r';
Code
Diff
  • SELECT*FROM transactions
    WHERE customer is not NULL
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE customer is not NULL
Code
Diff
  • SELECT*FROM transactions
    WHERE customer is NULL
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE customer is NULL
Code
Diff
  • SELECT*FROM transactions
    WHERE store NOT IN ('BIE Store Jakarta','BIE Store Bandung')
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE store NOT IN ('BIE Store Jakarta','BIE Store Bandung')
Code
Diff
  • SELECT*FROM transactions
    
    WHERE store IN ('BIE Store Bandung','BIE Store Palembang','BIE Store Malang')
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE store IN ('BIE Store Bandung','BIE Store Palembang','BIE Store Malang')
Code
Diff
  • SELECT store,total_price FROM transactions
    WHERE date >='2022-01-01' AND date <='2022-01-03'
    • -- Code Here
    • SELECT store,total_price FROM transactions
    • WHERE date >='2022-01-01' AND date <='2022-01-03'
Code
Diff
  • SELECT*FROM transactions 
    WHERE store='BIE Store Bandung' and total_price<= 100000;
    • -- Code Here
    • SELECT*FROM transactions
    • WHERE store='BIE Store Bandung' and total_price<= 100000;
Code
Diff
  • SELECT*FROM customers
    WHERE kota = 'Tasikmalaya';
    • -- Code here
    • SELECT*FROM customers
    • WHERE kota = 'Tasikmalaya';
Code
Diff
  • SELECT name AS Nama,age AS Umur FROM customers;
    • -- Code Here
    • SELECT name AS Nama,age AS Umur FROM customers;
Code
Diff
  • SELECT name,age FROM customers
    • -- Code Here
    • SELECT name,age FROM customers
Loading more items...