In this example we ask VerbaGPT a plotting question that requires a non-trivial SQL query.
Video of VerbaGPT in action:
User question: Give me a bar plot of sales, by album, of U2
VerbaGPT response: ![]()
Cost of query: $0.00*
* Using open-source llama4-maverick model from OpenRouter
Answer:

VerbaGPT identified the correct database (“Chinook”), identified relevant tables, performed the necessary joins and answered the question correctly.
Side note: ‘All That You Can’t Leave Behind’ doesn’t deserve to be last on this plot…
Detailed VerbaGPT read-out window & (editable) code:
In addition to producing the chart, VerbaGPT also provides the user with the following (editable) code. If the user chooses to, they can edit the code before hitting execute button, or simply hit execute without editing the code to produce the image shown above.
import matplotlib.pyplot as plt
import pandas as pd
query = """
SELECT al.Title, SUM(il.Quantity) AS Sales
FROM Album al
JOIN Artist ar ON al.ArtistId = ar.ArtistId
JOIN Track t ON t.AlbumId = al.AlbumId
JOIN InvoiceLine il ON il.TrackId = t.TrackId
WHERE ar.Name = 'U2'
GROUP BY al.Title
ORDER BY Sales DESC;
"""
df = pd.read_sql_query(query, conn)
df.plot.bar(x='Title', y='Sales', rot=90)
plt.show()

Leave a Reply