Skip to content

Tag: sql

How To use multiple columns

I’m trying to get a result : does not work for me, any help Answer You can use GROUP_CONCAT for that purpose day | kine | color –: | :—- | :—————– 1 | 1,2 | white,orange 2 | 1,2,3 | White,Orange,White db<>fiddle here

PostgreSQL Transform Geometries

I have a table full of Easting/Northing points that I want to transform into a column in SRID:27700. I’m using Postgres with postgis installed. I’m trying this: Of course this returns the locations in easting/northing, but when I try to first transform the points using ST_Transform, it returns SQL…

Keyword IF not expected

I have the following inline SQL code, running on an AS400. The IF comes up as unexpected but I don’t understand why. What I’m trying to do is to build a stored procedure to update, or insert, a …

SQL – combine rows conditionally on the value of previous row

My issue I believe is best explained by using an example: Sample Data SO Customer Product Description Quantity Extension Country 01 xxx 123 Product A 01 20.00 USA 02 yyy 456 Product B 02 25.00 China 02 yyy 456 Product B 01 12.50 China 02 yyy 789 Product C 01 50.00 Mexico 03 zzz 789 Product C 01 50.00 Mexico

Adding all values from output SQL

So, i have a query which looks like this: And it gives me back: Is there any way that this query will give me back added value? Just number 860. Kindly please help me :/ Answer You can just sum all the points you got from your query: