How to display graph with data stored in PostgreSQL

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
but don’t understand on what data it’s working.