By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
version() |
---|
10.3.32-MariaDB |
case_id | client_id | m_d | m_d |
---|---|---|---|
10 | 1000 | 2018-10-02 | null |
20 | 2000 | 2018-11-21 | null |
20 | 2001 | 2018-11-21 | null |
20 | 2002 | 2018-11-21 | null |
30 | 3000 | 2019-03-04 | 2022-01-01 |
30 | 3001 | 2019-04-04 | 2022-02-01 |
30 | 3002 | 2019-05-04 | 2022-03-01 |
30 | 3003 | 2019-06-04 | 2022-04-01 |
30 | 3004 | 2019-07-04 | 2022-05-01 |
Variable_name | Value |
---|---|
sql_mode | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
ID | case_id | client_id | arrival | departure |
---|---|---|---|---|
1 | 10 | 1000 | 2018-10-02 | null |
4 | 20 | 2000 | 2018-11-21 | null |
5 | 20 | 2001 | 2018-11-21 | null |
6 | 20 | 2002 | 2018-11-21 | null |
7 | 30 | 3000 | 2019-03-04 | 2022-01-01 |
8 | 30 | 3001 | 2019-04-04 | 2022-02-01 |
9 | 30 | 3002 | 2019-05-04 | 2022-03-01 |
10 | 30 | 3003 | 2019-06-04 | 2022-04-01 |
11 | 30 | 3004 | 2019-07-04 | 2022-05-01 |
Variable_name | Value |
---|---|
sql_mode | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
Variable_name | Value |
---|---|
sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
case_id | client_id | arrival | departure |
---|---|---|---|
10 | 1000 | 2018-10-02 | null |
20 | 2000 | 2018-11-21 | null |
20 | 2001 | 2018-11-21 | null |
20 | 2002 | 2018-11-21 | null |
30 | 3000 | 2019-03-04 | 2022-01-01 |
30 | 3001 | 2019-04-04 | 2022-02-01 |
30 | 3002 | 2019-05-04 | 2022-03-01 |
30 | 3003 | 2019-06-04 | 2022-04-01 |
30 | 3004 | 2019-07-04 | 2022-05-01 |
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
case_id | client_id | departure |
---|---|---|
10 | 1000 | 2018-10-02 |
10 | 1000 | 2019-04-26 |
10 | 1000 | 2019-05-02 |
20 | 2000 | 2018-11-21 |
20 | 2001 | 2018-11-21 |
20 | 2002 | 2018-11-21 |
30 | 3000 | 2019-03-04 |
30 | 3001 | 2019-04-04 |
30 | 3002 | 2019-05-04 |
30 | 3003 | 2019-06-04 |
30 | 3004 | 2019-07-04 |
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE
SELECT
case_id, client_id, -- removed ID fields!
MIN(arrival) ...' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE -- same plans as for IF - why not use standard construct?
SELECT
c...' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE
SELECT
case_id, client_id, fva AS first_arrival, lvd AS last_depar...' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE, BUFFERS, VERBOSE)
SELECT
case_id, client_id,
MIN(arrival) AS m_d...' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE, BUFFERS, VERBOSE)
SELECT
case_id, client_id, fva AS first_arrival...' at line 1