Guides
Connecting DuckDB to YouPlot
Finally, the data can now be piped to YouPlot! Let's assume we have an `input.json` file with dates and number of purchases made by somebody on that date. Using the query above, we'll pipe the data to the `uplot` command to draw a plot of the Top 10 Purchase Dates  
```bash
duckdb -s "COPY (SELECT date, sum(purchases) AS total_purchases FROM read_json_auto('input.json') GROUP BY 1 ORDER BY 2 DESC LIMIT 10) TO '/dev/stdout' WITH (FORMAT 'csv', HEADER)" \
| uplot bar -d, -H -t "Top 10 Purchase Dates"
```  
This tells `uplot` to draw a bar plot, use a comma-seperated delimiter (` -d,`), that the data has a header (` -H`), and give the plot a title (` -t`).  
![youplot-top-10](../images/guides/youplot/top-10-plot.png)