Skip to content
Advertisement

Tag: postgresql

Temp sequence in postgres view

I have a table that I order a certain way often. That ordering is the basis of a derived column we can call rank. If I query the entire table, I can have the database calculate that rank for me: This yields useful results like: With that result set I can determine the rank of any foo. However this requires

How to visualize database tables in postgresql using pgAdmin?

I am trying to visualize tables and their relations using pgAdmin. I have understood that there is a query visualizer tool available for pgAdmin. However, that only is useful if you are dealing with queries. My main goal is to generate a graphical representation of all the tables available in database. Answer I have found this webpage on postgresql wiki,

Group query results by month and year in postgresql

I have the following database table on a Postgres server: I would like to create a query that gives the SUM of the Sales column and groups the results by month and year as follows: Is there a simple way to do that? Answer At the request of Radu, I will explain that query: to_char(date,’Mon’) as mon, : converts the

Advertisement