How to Visualize PostgreSQL Query Data
Indiequery turns your PostgreSQL query results into charts and formatted tables with a few clicks. Run your query, choose a visualization type (bar, line, area, or table), and customize colors, labels, and formatting. No exports to Excel, no custom code - just clean visualizations you can share.
Create Charts from Query Results
After running a query, click Add Visualization to create a chart. Choose from:
- Bar charts - Compare values across categories
- Line charts - Show trends over time
- Area charts - Highlight volume or cumulative trends The chart builder lets you pick which column to use for the X-axis and which columns to plot as data series. Each series can have its own color and display settings.
Example: Track daily signups over the last month.
SELECT DATE(created_at) as signup_date, COUNT(*) as signups
FROM users
WHERE created_at > NOW() - INTERVAL '30 days'
GROUP BY signup_date
ORDER BY signup_date;
Run the query, add a line chart visualization, set signup_date as the X-axis, and plot signups as a line series.
Customize Chart Appearance
Click into any chart to adjust:
- Series colors - Pick custom hex colors for each data series
- Line width - Make lines thicker or thinner
- Fill opacity - Control how transparent area fills appear
- Display mode - Overlay multiple series or stack them
- Legend - Show or hide the chart legend
- Y-axis labels - Add custom labels for clarity Charts automatically scale axes based on your data. No manual configuration of min/max values needed.
Plot Multiple Data Series
Add multiple series to show different metrics on the same chart. Each series can use a different chart type - mix lines, bars, and areas on one visualization.
Example: Show revenue (bars) and customer count (line) together.
SELECT
DATE_TRUNC('month', created_at) as month,
SUM(amount) as revenue,
COUNT(DISTINCT customer_id) as customers
FROM orders
GROUP BY month
ORDER BY month;
Add two series: one bar series for revenue and one line series for customers. The dual-axis support lets you plot different scales on the left and right Y-axes.
Use Stacked Charts
Switch to stacked mode to show how different categories contribute to a total. Choose between absolute stacking (shows actual values) or percentage stacking (shows proportions).
Useful for breaking down data by category:
SELECT
DATE(created_at) as date,
subscription_tier,
COUNT(*) as signups
FROM users
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY date, subscription_tier
ORDER BY date;
Create a stacked area chart to see how Free, Pro, and Enterprise signups trend over time.
Format Tables with Custom Settings
Tables show your query results in a clean, readable format. Customize how data displays:
- Pagination - Set rows per page (default 50)
- Row numbers - Show or hide row numbers
- Zebra striping - Alternate row colors for readability
- Sortable columns - Click headers to sort
- Column visibility - Hide columns you don't need
Format Individual Columns
Click Configure Columns to customize how each column displays:
Number formatting:
- Decimal places (2 for currency, 0 for counts)
-
Thousand separators (1,000 vs 1000) Date formatting:
-
Choose format patterns (MMM DD, YYYY or YYYY-MM-DD)
-
Dates display in readable formats automatically Currency formatting:
-
Format as currency with $ symbols and proper decimals Custom labels:
-
Rename column headers (change
user_countto "Total Users") Null handling: -
Display empty values as "—" or any custom text Example table with formatted columns:
SELECT
email,
created_at,
subscription_tier,
monthly_revenue,
last_login
FROM users
LIMIT 100;
Format created_at as "MMM DD, YYYY", monthly_revenue as currency with 2 decimals, and hide last_login if not needed.
Share Visualizations Publicly
Click Share Publicly to generate a public link for any visualization. Anyone with the link can view the chart or table, even without an Indiequery account.
Useful for:
- Sharing dashboards with clients or stakeholders
- Embedding live data in reports
- Publishing metrics to your team Public visualizations show live data - they automatically update when you re-run the underlying query.
Common Visualization Examples
Sales by month (bar chart):
SELECT
DATE_TRUNC('month', created_at) as month,
SUM(amount) as total_sales
FROM orders
GROUP BY month
ORDER BY month;
User growth over time (area chart):
SELECT
DATE(created_at) as date,
COUNT(*) as new_users
FROM users
GROUP BY date
ORDER BY date;
Top products by revenue (bar chart):
SELECT
product_name,
SUM(quantity * price) as revenue
FROM order_items
GROUP BY product_name
ORDER BY revenue DESC
LIMIT 10;
Subscription breakdown (stacked area):
SELECT
DATE(created_at) as date,
subscription_tier,
COUNT(*) as users
FROM users
GROUP BY date, subscription_tier
ORDER BY date;
Save Visualizations with Queries
Visualizations save automatically with your queries. Load any saved query and your charts appear exactly as you configured them. No need to recreate visualizations each time you run the same analysis.
Mobile-Responsive Design
All charts and tables work on mobile devices. Charts scale to fit smaller screens, and tables become horizontally scrollable so you can see all columns on your phone.
Check your metrics anywhere - no desktop required.