Example shop dashboard

A made-up shop's orders, customers and products, in SQLite running in this page. Each panel's query is written in a Substrate DSL and was compiled to SQL with the app.

orders2557
revenue59,655
average23.33
customers320

Revenue by month

2024-11: 23262024-12: 29002025-01: 17802025-02: 18552025-03: 20742025-04: 18312025-05: 19842025-06: 21092025-07: 17322025-08: 21372025-09: 26482025-10: 24682025-11: 29222025-12: 47242026-01: 25222026-02: 22452026-03: 25162026-04: 22592026-05: 26142026-06: 26282026-07: 26682026-08: 23982026-09: 33902026-10: 2930peak 47242024-112026-10
Query
(from orders
  (group (month date))
  (select (as (month date) month) (as (round (sum total)) revenue))
  (order month))
Open in the query page

Best customers

namecityordersspent
Klara IvanovaPrague521251
Felix YoungLisbon421243
Felix VargaParis37941
Sami CostaLisbon45920
Nils CostaLisbon25827
Hugo GarciaLisbon37798
Klara JansenVienna30782
Ben LopezAmsterdam26738
Query
(from orders
  (join customers (= orders.customer customers.id))
  (group customers.id)
  (select customers.name customers.city (as (count) orders) (as (round (sum orders.total)) spent))
  (order (desc spent))
  (limit 8))
Open in the query page

Top products

Burr grinder6240Ethiopia Guji5421Kenya Nyeri5339Sumatra decaf4290Colombia Huila4096Espresso blend3984House blend3724Gift card3000Jasmine pearls2864Travel mug2222
Query
(from orders
  (join products (= orders.product products.id))
  (group products.name)
  (select products.name (as (round (sum orders.total)) revenue))
  (order (desc revenue))
  (limit 10))
Open in the query page

Customers by country

Portugal58Germany48France45Spain44Netherlands35Italy24Ireland20Austria19Denmark12Norway9Czechia6
Query
(from customers
  (group country)
  (select country (as (count) customers))
  (order (desc customers)))
Open in the query page

SQLite 3.51.2 runs in this page, compiled to WebAssembly. The shop and its data are made up.

Source on GitHub ↗
SQLite explorer