Lines Matching refs:depth
36 SELECT count(*), depth FROM cx WHERE root=1 GROUP BY depth ORDER BY 1;
40 below(id,depth) AS (
43 SELECT t1.x, below.depth+1
46 SELECT count(*), depth FROM below GROUP BY depth ORDER BY 1;
55 below(id,depth) AS (
58 SELECT t1.x, below.depth+1
60 WHERE below.depth<2
62 SELECT id, depth FROM below ORDER BY id;
67 SELECT * FROM cx WHERE root=16384 AND depth<=2 ORDER BY id;
71 below(id,depth) AS (
74 SELECT t1.x, below.depth+1
76 WHERE below.depth<2
78 SELECT id, depth FROM below ORDER BY id;
83 SELECT id, depth, root, tablename, idcolumn, parentcolumn FROM cx
85 AND depth=1
91 SELECT id, depth, root, tablename, idcolumn, parentcolumn FROM cx
93 AND depth=3
99 above(id,depth) AS (
102 SELECT t1.y, above.depth+1
104 WHERE above.depth<3
106 SELECT id FROM above WHERE depth=3;
109 # depth<5
111 SELECT count(*), depth FROM cx WHERE root=1 AND depth<5
112 GROUP BY depth ORDER BY 1;
116 below(id,depth) AS (
119 SELECT t1.x, below.depth+1
121 WHERE below.depth<4
123 SELECT count(*), depth FROM below GROUP BY depth ORDER BY 1;
126 # depth<=5
128 SELECT count(*), depth FROM cx WHERE root=1 AND depth<=5
129 GROUP BY depth ORDER BY 1;
132 # depth==5
134 SELECT count(*), depth FROM cx WHERE root=1 AND depth=5
135 GROUP BY depth ORDER BY 1;
138 # depth BETWEEN 3 AND 5
140 SELECT count(*), depth FROM cx WHERE root=1 AND depth BETWEEN 3 AND 5
141 GROUP BY depth ORDER BY 1;
144 # depth==5 with min() and max()
146 SELECT count(*), min(id), max(id) FROM cx WHERE root=1 AND depth=5;
150 below(id,depth) AS (
153 SELECT t1.x, below.depth+1
155 WHERE below.depth<5
157 SELECT count(*), min(id), max(id) FROM below WHERE depth=5;
213 WHERE root=20 AND depth<=2)
221 WHERE root=20 AND depth=2)
222 AND depth=2
226 WHERE root=20 AND depth=1)
227 AND depth<=1
269 AND depth=3
292 SELECT * FROM t4, vt4 WHERE t4.id = vt4.root AND vt4.id=4 AND vt4.depth=2;