Mulai sekarangMulai gratis

Histogram of orders

Dave also wants to plot the histogram of orders to see if it matches the shape of the histogram of revenues.

Send Dave a frequency table of orders by user.

Latihan ini merupakan bagian dari kursus

Analyzing Business Data in SQL

Lihat Kursus

Latihan interaktif langsung praktik

Cobalah latihan ini dengan melengkapi kode contoh ini.

SELECT
  -- Select the user ID and the count of orders
  ___,
  ___ AS orders
FROM orders
GROUP BY user_id
ORDER BY user_id ASC
LIMIT 5;
Edit dan Jalankan Kode