blob: 53670f61c8c19054153717f1d04f10725c7b6e08 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
PRAGMA DisableSimpleColumns;
$input = (
select 2 as id,
3 as taskId,
4 as previousId
union all
select 1 as id,
null as taskId,
2 as previousId
);
SELECT count(*)
FROM $input AS diff
INNER JOIN $input AS taskSuite ON diff.previousId = taskSuite.id
LEFT JOIN $input AS pedestrian ON diff.taskId = pedestrian.id
WHERE
diff.id = 1
;
|