/Docs
Dashboard
Embedding

Embed a SQL query result

Run a query against your PostgreSQL database and embed the live result on any website. Show a user count, revenue total, active subscriptions, or any metric your database holds, updating automatically.

Use cases

  • Live user count on a SaaS landing page
  • Revenue or MRR counter on a public dashboard
  • Active session count on an internal ops board
  • Error rate from your database logs

How to embed

  1. Create a free account on 7di.
  2. Add a SQL query widget.
  3. Write a query that returns the value you want (first column, first row).
  4. Enable Public embed and copy the iframe code.
<iframe
 src="https://7di.vision/embed/{your-token}?theme=dark"
 width="320" height="180" frameborder="0"
 style="border-radius:12px;overflow:hidden"
></iframe>

Full widget details: SQL query widget.

Theme

Table

userplanmrr
alice@acme.comPro$420
bob@corp.ioEnterprise$1,200
carol@startup.coPro$420
dan@agency.devFree$0

09:18 PM · 1h · Top users by revenue

SQL Query

Stacked bar

Signups by plan

Pro

Pro43%
Free43%
Enterprise13%

09:18 PM · 1h

SQL Query

Chart

Active users

1420

09:18 PM · 1h

SQL Query

Value

Active users

1,420

09:18 PM · 1h

SQL Query