I have two tables where I would like to compare information (In order to get from the initial table to the other I need to go through a reference table). I am getting the results I am looking for …
offset with parameter in PL/SQL procedure
I have a PL/SQL procedure. It executes a SQL statement and returns a json responce. I would like to limit the rows returned using the offset clause. eg: select * from wherever where something = …
SELECT the patients that have similar disease name EF core 3.1
I have the following tables Patients ID PatientName PatientIDNumber —- ————- —————– 1 Jo 411420607 2 Mark 206047758 …
group by id and random sample by id from two tables in big query sql
I have a 2 tables with the same structure: table1 id text var 1 “bla bla” 100 1 “blabla1” 30 2 “qweweqty” 0 2 etc… 7 3 3 1 .. 100 table2 id text …
Oracle “NOT IN” not returning correct result?
I’m comparing two tables that share unique values between each other using NOT IN function in Oracle but I’m getting the output is: 521254 for all charging ids –< this is the total unique charging ID’s in BILLINGDB201908 Now I want to find id’s in table BILLINGDB201908 that al…
GROUPING multiple LIKE string
Data: In above data, there are 3 kinds of strings I am interested in warning, error and timeout Can we have a single query where it will group by string and give the count of occurrences as below Output: I know I can write separate queries to find count individually. But interested in a single query Thanks An…
How to combine BigQuery LAST_VALUE() and ARRAY_AGG()
Here is a toy example: select * from( select 1 as row_num,298807 as id1,104 as id2,’2018-07-10′ as date union all select 2,298807,104,’2018-08-02′ union all select 3,298807,104,’2018-08-06′ union all …
Build change history from table with historical row values
I have table that is storing historical values for data in other table: Now I need to generate from such table “change log” which will show what was old value, new value and when update occur: Unfortunately, I can’t change structure of the existing table and can’t put old value there, …
Getting error while tryng to add geometry (polygon z) to table
I’m trying to insert a row to postgres (postgis) table and getting error. My table (geo_table) properties: I’m trying to add data: I’m getting the following error: syntax error at or near “Z” …(name, geometry, in_use) VALUES (‘tb2’, POLYGON Z (( what is the erro…
How to select multiple cells in one specific column from a table
My goal is to SELECT Each VALUE to where it has it’s own cell for the input of a report… For example. ETC…. The end result I am looking for is to have all cells from the value column as their own column individually so I can input them in a telerik report using field inputs. Thanks Answer Yo…