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
Query
(from orders (group (month date)) (select (as (month date) month) (as (round (sum total)) revenue)) (order month))
Best customers
| name | city | orders | spent |
|---|---|---|---|
| Klara Ivanova | Prague | 52 | 1251 |
| Felix Young | Lisbon | 42 | 1243 |
| Felix Varga | Paris | 37 | 941 |
| Sami Costa | Lisbon | 45 | 920 |
| Nils Costa | Lisbon | 25 | 827 |
| Hugo Garcia | Lisbon | 37 | 798 |
| Klara Jansen | Vienna | 30 | 782 |
| Ben Lopez | Amsterdam | 26 | 738 |
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))
Top products
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))
Customers by country
Query
(from customers (group country) (select country (as (count) customers)) (order (desc customers)))