Ad
Code
Diff
  • -- Code Here
    SELECT
      d.city_name kota,
      SUM(c.confirmed_cases) confirmed_cases,
      SUM(c.recovered_cases) recovered_cases,
      SUM(c.death_cases) death_cases
    FROM cases c, dati d
    WHERE c.dati_code = d.code
    GROUP BY d.city_name
    ORDER BY confirmed_cases DESC;
    • --- Code Here
    • -- Code Here
    • SELECT
    • d.city_name kota,
    • SUM(c.confirmed_cases) confirmed_cases,
    • SUM(c.recovered_cases) recovered_cases,
    • SUM(c.death_cases) death_cases
    • FROM cases c, dati d
    • WHERE c.dati_code = d.code
    • GROUP BY d.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 DESC;
    • --- Code Here
    • -- Code Here
    • SELECT *
    • FROM transactions
    • ORDER BY 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%r';
    • --- Code Here
    • -- Code Here
    • SELECT *
    • FROM transactions
    • WHERE customer LIKE 'S%r';
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;
Code
Diff
  • -- Code here
    SELECT * FROM customers;
    • -- Code here
    • SELECT * FROM customers;