Skip to content
Advertisement

Tag: postgresql

How to force Postgres to calculate with numeric precision

I have a .net core application using dapper with Postgresql. Windows, PostgreSQL 12.0, compiled by Visual C++ build 1914, 64-bit When i do simple calculation in the select-statement, then i get different results if i do not provide fractions: 1258 1208 What’s the reason and what’s the best way to get correct numeric result? Answer Postgres, as many other databases

How to average/aggregate the result off a SQL query?

I have a table with many rows each belonging to different users. I first want to select all rows the belong to one user and then on each row add the average for that a certain column but can’t make it work. I’m would like the result to display the average on each row for the user but it’s currently

Advertisement