Skip to content

Tag: sql

Bigquery Full Join ON multiple conditions

I want to perform a Full Outer join on two tables with multiple conditions to result all the matching records along with unmatched records from both tables. Tbl1 is a bigger table with 21 M records and Tbl2 has 5k rows, like the example query below. But the outer join cannot be performed with OR conditions be…

MySQL – Joins and Subqueries [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question I&#82…

Generating sequence numbers

I have table A I have table B How do i get values ‘304’, ‘305’….n in B.number column if any new values comes in table A by keeping table B static(i.e keeping the old values in table B unchanged) Answer This should work, as you’ve posed the question. But this is a strange th…

Problem in creating new table ORA-00906: missing left parenthesis

Here is my instruction : it works on my friend computer ! A ORA-00906: missing left parenthesis Any help ! Answer Please make sure all the “varchar” fields has a length defined. In your second table, it says: date_rdv VARCHAR NOT NULL, which I believe causing the issue, so try to change it into da…

Get least 10 values in mysql query

I have a table in mysql. Table Name is constitutive_table, it contains more than 40 columns and its type is varchar, it contains more than 25000 records. I wrote the query like this to get the 10 …

SQL – Naming conditions for filtering

I wrote MySQL query to filter and count items in a table by date and now a need to get results like: +—–+——————–+ | cnt | creation_date_date | +—–+——————–+ | 90 | …