mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Dont use test. db
This commit is contained in:
parent
96e4e389b7
commit
a9bc78d559
@ -1,6 +1,5 @@
|
||||
CREATE DATABASE IF NOT EXISTS test;
|
||||
DROP TABLE IF EXISTS test.one;
|
||||
CREATE TABLE test.one(dummy UInt8) ENGINE = Memory;
|
||||
DROP TABLE IF EXISTS one;
|
||||
CREATE TABLE one(dummy UInt8) ENGINE = Memory;
|
||||
|
||||
SELECT database, t.name
|
||||
FROM system.tables AS t
|
||||
@ -91,4 +90,4 @@ SELECT count()
|
||||
JOIN system.databases AS db ON db.name = t.database
|
||||
WHERE t.name = 'one';
|
||||
|
||||
DROP TABLE test.one;
|
||||
DROP TABLE one;
|
||||
|
@ -1,5 +1,3 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS appointment_events;
|
||||
CREATE TABLE appointment_events
|
||||
(
|
||||
@ -29,11 +27,11 @@ SELECT A._appointment_id,
|
||||
A._vacancy_id,
|
||||
A._set_at,
|
||||
A._job_requisition_id
|
||||
FROM test.appointment_events A ANY
|
||||
FROM appointment_events A ANY
|
||||
LEFT JOIN
|
||||
(SELECT _appointment_id,
|
||||
MAX(_set_at) AS max_set_at
|
||||
FROM test.appointment_events
|
||||
FROM appointment_events
|
||||
WHERE _status in ('Created', 'Transferred')
|
||||
GROUP BY _appointment_id ) B USING _appointment_id
|
||||
WHERE A._set_at = B.max_set_at;
|
||||
|
Loading…
Reference in New Issue
Block a user