Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE TABLE books ( Year year, Name varchar(64), Author varchar(64) ); insert into books values ('2000', '1984', 'Джордж Оруэлл'), ('2000', 'Скотный двор', 'Джордж Оруэлл'), ('2007', 'Книга', 'Джордж Оруэлл'), ('2005', 'Памяти Каталонии', 'Джордж Оруэлл'), ('2001', 'Джордж Оруэлл', 'Джордж Оруэлл'); SELECT Year, Author, count(*) books_count FROM books GROUP BY Year, Author ORDER BY books_count

Stuck with a problem? Got Error? Ask AI support!

Copy Clear