in the below posted query i want to query the following information ST_Transform(ST_SetSRID(ST_GeomFromGeoJSON(feature->>’geometry’),4326),25832) AS LIDARDataPolygonsAsGeometry The …
Tag: sql
I have two tables DOCUMENT and SIGNATURES, like below DOCUMENTS doc_id doc_name 1 Contract 2 Lead 3 Invoice 1 4 Invoice 2 5 Payment 123 SIGNATURES sig_id …
Good morning I will need help I test several methods but none of them work I would like to have the result as an average. Knowing that they are COUNTs of two separate tables with columns not having …
I have field of type json. Example value is: [{“id”: “960287”, “src_ip”: “X.X.X.X”, “filename”: “XXX-20200408092811-0”, “order_id”:…
I’m having problems with the following trigger that records when an insertion with attribute ‘numero’= 4 is made on table A by inserting into table B who made the modification and the number of …
table1 has 3 columns in my database: id, category, timestamp. I need to query the newest 3 rows from each category: WITH ranked_rows AS (SELECT t.*, ROW_NUMBER() OVER (PARTITION BY category ORDER BY t….
Problem explain I won’t update the last primary key of the 3 primary key concatenate. But the problem is sometimes the first and second primary key was the same for multiple records. And in this case, …
I have a table called treeview with a id, name, assettype and parent. I have another table wich is called events with a id and treeid. a treeview instance can have events and then treeview.id = events….
I have following example SELECT oa.country_id, s.country_id, (IF( s.country_id = oa.country_id, DATE_ADD(DATE(so.created_at), INTERVAL 2 DAY), DATE_ADD(…
I have 2 tables: table 1: task cnt 1 4 2 5 3 6 table 2: task cnt2 1 7 2 5 3 6 4 3 I want to add a column for table 2 such that if cnt in table1 for a task is …