SQLize
Online
/
PHPize Online
/
SQLtest Online
A
A
A
Share
Donate
Blog
Popular
Donate
A
A
A
Share
Blog
Popular
SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code.
You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.
SQL code:
Upload
Copy
Format
Clear
DROP TABLE if EXISTS public.coins; DROP TABLE if EXISTS ans; CREATE TABLE IF NOT EXISTS public.coins( dt VARCHAR(16), avg_price NUMERIC, symbol VARCHAR(8), high_price NUMERIC, vol NUMERIC, full_nm VARCHAR(128), tx_cnt NUMERIC ); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2018-10-20', 10, 'DOGE', 1, 10, 'WOW', 0); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2019-10-20', 10, 'DOGE', 2, 15, 'WOW', 1); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2018-10-10', 100, 'DOGE', 3, 0, 'NO', 1); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2018-09-10', 100, 'DOGE', 3, 0, 'NO', 1); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2018-08-10', 100, 'DOGE', 2, 0, 'NO', 1); INSERT INTO public.coins (dt, avg_price, symbol, high_price, vol, full_nm, tx_cnt) VALUES ('2018-10-30', 15, 'DOGE', 4, 25, 'yes', 2); SELECT symbol, dt FROM public.coins WHERE (symbol, high_price, dt) IN (SELECT symbol, MAX(high_price) as high_price, MIN(dt) as dt FROM public.coins GROUP BY symbol) ORDER BY high_price DESC, symbol ASC; /*SELECT UPPER(full_nm) AS full_name, min(dt) as dt, MAX(high_price) AS price FROM ( SELECT UPPER(full_nm) as full_nm, MIN(dt) as dt, high_price FROM public.coins GROUP BY UPPER(full_nm), high_price ) AS coins GROUP BY UPPER(full_nm);*/
SQL
Server:
MariaDB 11.4
MariaDB 11.5
MariaDB 10
MariaDB 10 Sakila (ReadOnly)
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
SQLite 3
SQLite 3 Preloaded
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 11
PostgreSQL 12
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
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)
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 23c Free
SOQOL
Version
ER Diagram
Preserve result
Stuck with a problem?
Got Error?
Ask ChatGPT!
Result:
Copy
Clear