Hi! Could we please enable some services and cookies to improve your experience and our website?
No, thanks.
Okay!
-- Hint: use Ctrl+Enter for SQL autocomplete
create table sales (guest_id int, point int);
insert into sales values
(1, 1), (1, 2), (1, 3),
(2, 2), (2, 3), (2, 4)
;
select point, count(distinct guest_id) as guest_count
from sales
group by point;
SQL Server:
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
MySQL 9.3.0
MariaDB 11.4
MariaDB 11.8
MariaDB 11.8 OpenFlights (ReadOnly)
MariaDB 10
MariaDB 10 Sakila (ReadOnly)
SQLite 3
SQLite 3 Preloaded
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
PostgreSQL 16
PostgreSQL 17 + PostGIS
PostgreSQL 17 + PostGIS WorkShop (ReadOnly)
MS SQL Server 2017
MS SQL Server 2019
MS SQL Server 2022
MS SQL Server 2022 AdventureWorks (ReadOnly)
Firebird 4.0
Firebird 4.0 (Employee)
Firebird 5.0
RedDatabase 5.0
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 26ai
SOQOL
ClickHouse
Run SQL code
Save snippet
ER Diagram