SQL Explorer Demo Environment
This environment resets nightly. Any data or connections you add are public.

Recent Query Logs - Page 1

Run At Run By Database Connection Duration SQL Query ID Playground
12/21/2024 12:05 p.m. admin northwind.db ms SELECT sql, AVG(duration) AS average_duration FROM explorer_querylog GROUP BY sql ORDER BY average_duration DESC; Query 26 Open
12/21/2024 10:40 a.m. admin northwind.db ms WITH LengthStats AS ( SELECT AVG(LENGTH(prompt)) AS mean_length, AVG(LENGTH(prompt) * LENGTH(prompt)) - AVG(LENGTH(prompt)) * AVG(LENGTH(prompt)) AS variance FROM explorer_promptlog ) SELECT mean_length AS average_length, SQRT(variance) AS length_variability FROM LengthStats; Query 20 Open
12/21/2024 10:18 a.m. admin northwind.db 3.71ms select * from Categories Query 27 Open
12/21/2024 9:32 a.m. admin northwind.db ms select * from django_migrations where django_migrations.app = '' Query 13 Open
12/21/2024 9:24 a.m. admin sqlite-sakila.db 6.73ms select * from staff; Query 19 Open
12/21/2024 8:56 a.m. admin northwind.db 3.56ms select * from Customers WHERE City='Berlin' Query 258 Open
12/21/2024 8:56 a.m. admin northwind.db ms SELECT app, COUNT(*) AS num_migrations FROM django_migrations GROUP BY app ORDER BY num_migrations ASC; Query 4 Open
12/21/2024 8:47 a.m. admin northwind.db 21.78ms SELECT o.OrderID, o.CustomerID, o.EmployeeID, o.OrderDate FROM Orders o ORDER BY o.OrderDate DESC LIMIT 10; Query 324 Open
12/21/2024 8:46 a.m. admin northwind.db ms Select * from new_results_austin where new_results_austin.email != 'None' Query 93 Open
12/21/2024 8:37 a.m. admin northwind.db 3.68ms select * from customers limit 12 Query 291 Open
12/21/2024 8:12 a.m. admin None ms WITH rental_counts AS ( SELECT f.film_id, f.title, fc.category_id, COUNT(r.rental_id) AS rental_count FROM rental r JOIN inventory i ON r.inventory_id = i.inventory_id JOIN film f ON i.film_id = f.film_id JOIN film_category fc ON f.film_id = fc.film_id GROUP BY f.film_id, fc.category_id ), popular_films AS ( SELECT film_id, title, category_id, rental_count, ROW_NUMBER() OVER (PARTITION BY category_id ORDER BY rental_count DESC) AS rn FROM rental_counts ) SELECT film_id, title FROM popular_films WHERE rn <= 3 -- Limit to the most popular few films per category ORDER BY RANDOM() -- Randomly select 3 films LIMIT 3; Query 17 Open
12/21/2024 7:43 a.m. admin northwind.db ms SELECT * FROM Orders LEFT JOIN [Order Details] od ON od.OrderID = Orders.OrderID Query 95 Open
12/21/2024 7:33 a.m. admin northwind.db 8.67ms SELECT Orders.OrderID, "Order Details".Quantity, "Order Details".UnitPrice, "Order Details".Discount, ("Order Details".Quantity * "Order Details".UnitPrice) as OrderTotal, ("Order Details".Quantity * "Order Details".UnitPrice)-"Order Details".Discount as ToTalAfterDiscount, Customers.ContactName, Customers.Phone, Products.ProductName FROM Orders LEFT JOIN "Order Details" ON "Order Details".OrderID = Orders.OrderID LEFT JOIN Customers ON Customers.CustomerID = Orders.CustomerID LEFT JOIN Products ON Products.ProductID = "Order Details".ProductID limit 200 Query 96 Open
12/21/2024 7:33 a.m. admin northwind.db ms WITH rental_info AS ( SELECT r.rental_id, fc.category_id FROM rental r JOIN inventory i ON r.inventory_id = i.inventory_id JOIN film_category fc ON i.film_id = fc.film_id ) SELECT c.name AS category_name, COUNT(ri.rental_id) AS rental_count FROM rental_info ri JOIN category c ON ri.category_id = c.category_id GROUP BY c.name ORDER BY rental_count DESC; Query 16 Open
12/21/2024 7:27 a.m. admin northwind.db ms WITH LengthStats AS ( SELECT AVG(LENGTH(prompt)) AS mean_length, AVG(LENGTH(prompt) * LENGTH(prompt)) - AVG(LENGTH(prompt)) * AVG(LENGTH(prompt)) AS variance FROM explorer_promptlog ) SELECT mean_length AS average_length, SQRT(variance) AS length_variability FROM LengthStats; Query 20 Open
12/21/2024 6:58 a.m. admin northwind.db ms ssdsds Query 390 Open
12/21/2024 6:47 a.m. admin northwind.db 3.42ms select * from Customers Query 126 Open
12/21/2024 6:44 a.m. admin northwind.db ms select * from call Query 225 Open
12/21/2024 6:26 a.m. admin northwind.db 554.72ms WITH SalesData AS ( SELECT o.OrderID, strftime('%Y', o.OrderDate) AS Year, (strftime('%m', o.OrderDate) - 1) / 3 + 1 AS Quarter, od.UnitPrice * od.Quantity AS SalesAmount FROM Orders o JOIN "Order Details" od ON o.OrderID = od.OrderID ) SELECT Year, Quarter, SUM(SalesAmount) AS TotalSales FROM SalesData GROUP BY Year, Quarter ORDER BY Year, Quarter; Query 14 Open
12/21/2024 6:15 a.m. admin northwind.db 4.43ms select * from Categories Query 97 Open