count(dl.dummy)
FROM system.one AS dl
ANY LEFT JOIN system.one AS d ON d.dummy = dl.dummy
ANY LEFT JOIN system.one AS ds ON ds.dummy = dl.dummy
WHERE d.dummy = 0
GROUP BY name
ORDER BY name ASC
┌─name─┬─count(name)─┐
│ 0 │ 1 │
└──────┴─────────────┘
SELECT
dl.dummy AS name,
count(dl.dummy)
FROM system.one AS dl
ANY LEFT JOIN system.one AS d ON d.dummy = dl.dummy
ANY LEFT JOIN system.one AS ds ON ds.dummy = dl.dummy
WHERE d.dummy = 0
GROUP BY dl.dummy
ORDER BY dl.dummy ASC
Received exception from server (version 19.9.1):
Code: 47. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Missing columns: 'dl.dummy' while processing query: 'SELECT name, count(name) FROM (SELECT * FROM system.one AS dl ANY LEFT JOIN system.one AS d ON --d.dummy = name) ANY LEFT JOIN system.one AS ds ON dummy = name WHERE --d.dummy = 0 GROUP BY dl.dummy ORDER BY dl.dummy ASC', required columns: 'dummy' 'name' 'dl.dummy' '--d.dummy', source columns: '--d.dummy' 'name', joined columns: 'dummy'.
а вот оно что, большое спасибо, прошу прощения что сразу не обратил внимание
Обсуждают сегодня