How to display graph with data stored in PostgreSQL

Hi
I’m fairly new to Grafana and have to display graphs using Grafana (6.3.4) with static data stored in Postgresql. I have created the Postgres datasource, but don’t how to proceed from here. If anybody can give any leads with some example data and how to write a query to draw a graph that would be great. I’ve already this https://grafana.com/docs/grafana/latest/features/datasources/postgres/#query-editor
but don’t understand on what data it’s working.