1
6.05 ms
SELECT DISTINCT s0_ . item_id AS item_id_0 , (SELECT COUNT (s1_ . item_id ) AS sclr_2 FROM statement_items s1_ INNER JOIN statement_items_props s3_ ON s1_ . item_id = s3_ . item_id INNER JOIN statement_props s2_ ON s2_ . prop_id = s3_ . prop_id AND (s2_ . deleted_at IS NULL ) WHERE (s1_ . item_id = s0_ . item_id ) AND (s1_ . deleted_at IS NULL )) AS sclr_1 , s0_ . item_id AS item_id_3 FROM statement_items s0_ LEFT JOIN statement_items_props s5_ ON s0_ . item_id = s5_ . item_id LEFT JOIN statement_props s4_ ON s4_ . prop_id = s5_ . prop_id AND (s4_ . deleted_at IS NULL ) WHERE (s0_ . deleted_at IS NULL ) ORDER BY sclr_1 ASC , s0_ . item_id ASC LIMIT 20
SELECT DISTINCT s0_ . item_id AS item_id_0 , (SELECT COUNT (s1_ . item_id ) AS sclr_2 FROM statement_items s1_ INNER JOIN statement_items_props s3_ ON s1_ . item_id = s3_ . item_id INNER JOIN statement_props s2_ ON s2_ . prop_id = s3_ . prop_id AND (s2_ . deleted_at IS NULL ) WHERE (s1_ . item_id = s0_ . item_id ) AND (s1_ . deleted_at IS NULL )) AS sclr_1 , s0_ . item_id AS item_id_3 FROM statement_items s0_ LEFT JOIN statement_items_props s5_ ON s0_ . item_id = s5_ . item_id LEFT JOIN statement_props s4_ ON s4_ . prop_id = s5_ . prop_id AND (s4_ . deleted_at IS NULL ) WHERE (s0_ . deleted_at IS NULL ) ORDER BY sclr_1 ASC , s0_ . item_id ASC LIMIT 20 ;
Copy
2
2.78 ms
SELECT s0_ . item_id AS item_id_0 , s0_ . created_at AS created_at_1 , s0_ . deleted_at AS deleted_at_2 , s0_ . name AS name_3 , s0_ . key AS key_4 , (SELECT COUNT (s1_ . item_id ) AS sclr_6 FROM statement_items s1_ INNER JOIN statement_items_props s3_ ON s1_ . item_id = s3_ . item_id INNER JOIN statement_props s2_ ON s2_ . prop_id = s3_ . prop_id AND (s2_ . deleted_at IS NULL ) WHERE (s1_ . item_id = s0_ . item_id ) AND (s1_ . deleted_at IS NULL )) AS sclr_5 FROM statement_items s0_ LEFT JOIN statement_items_props s5_ ON s0_ . item_id = s5_ . item_id LEFT JOIN statement_props s4_ ON s4_ . prop_id = s5_ . prop_id AND (s4_ . deleted_at IS NULL ) WHERE (s0_ . item_id IN (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )) AND (s0_ . deleted_at IS NULL ) ORDER BY sclr_5 ASC , s0_ . item_id ASC
Parameters :
[
11
17
1
13
14
15
3
4
6
7
8
9
12
16
2
5
10
18
]
SELECT s0_ . item_id AS item_id_0 , s0_ . created_at AS created_at_1 , s0_ . deleted_at AS deleted_at_2 , s0_ . name AS name_3 , s0_ . key AS key_4 , (SELECT COUNT (s1_ . item_id ) AS sclr_6 FROM statement_items s1_ INNER JOIN statement_items_props s3_ ON s1_ . item_id = s3_ . item_id INNER JOIN statement_props s2_ ON s2_ . prop_id = s3_ . prop_id AND (s2_ . deleted_at IS NULL ) WHERE (s1_ . item_id = s0_ . item_id ) AND (s1_ . deleted_at IS NULL )) AS sclr_5 FROM statement_items s0_ LEFT JOIN statement_items_props s5_ ON s0_ . item_id = s5_ . item_id LEFT JOIN statement_props s4_ ON s4_ . prop_id = s5_ . prop_id AND (s4_ . deleted_at IS NULL ) WHERE (s0_ . item_id IN (11 , 17 , 1 , 13 , 14 , 15 , 3 , 4 , 6 , 7 , 8 , 9 , 12 , 16 , 2 , 5 , 10 , 18 )) AND (s0_ . deleted_at IS NULL ) ORDER BY sclr_5 ASC , s0_ . item_id ASC ;
Copy
3
0.75 ms
SELECT count (DISTINCT s0_ . item_id ) AS sclr_0 FROM statement_items s0_ LEFT JOIN statement_items_props s2_ ON s0_ . item_id = s2_ . item_id LEFT JOIN statement_props s1_ ON s1_ . prop_id = s2_ . prop_id AND (s1_ . deleted_at IS NULL ) WHERE (s0_ . deleted_at IS NULL )
SELECT count (DISTINCT s0_ . item_id ) AS sclr_0 FROM statement_items s0_ LEFT JOIN statement_items_props s2_ ON s0_ . item_id = s2_ . item_id LEFT JOIN statement_props s1_ ON s1_ . prop_id = s2_ . prop_id AND (s1_ . deleted_at IS NULL ) WHERE (s0_ . deleted_at IS NULL );
Copy
4
0.46 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 11 AND ((t0 . deleted_at IS NULL ));
Copy
5
0.43 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 17 AND ((t0 . deleted_at IS NULL ));
Copy
6
0.40 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 1 AND ((t0 . deleted_at IS NULL ));
Copy
7
0.42 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 13 AND ((t0 . deleted_at IS NULL ));
Copy
8
0.39 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 14 AND ((t0 . deleted_at IS NULL ));
Copy
9
0.42 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 15 AND ((t0 . deleted_at IS NULL ));
Copy
10
0.38 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 3 AND ((t0 . deleted_at IS NULL ));
Copy
11
0.42 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 4 AND ((t0 . deleted_at IS NULL ));
Copy
12
0.52 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 6 AND ((t0 . deleted_at IS NULL ));
Copy
13
0.48 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 7 AND ((t0 . deleted_at IS NULL ));
Copy
14
0.47 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 8 AND ((t0 . deleted_at IS NULL ));
Copy
15
0.48 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 9 AND ((t0 . deleted_at IS NULL ));
Copy
16
0.48 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 12 AND ((t0 . deleted_at IS NULL ));
Copy
17
0.46 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 16 AND ((t0 . deleted_at IS NULL ));
Copy
18
0.52 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 2 AND ((t0 . deleted_at IS NULL ));
Copy
19
0.52 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 5 AND ((t0 . deleted_at IS NULL ));
Copy
20
0.47 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 10 AND ((t0 . deleted_at IS NULL ));
Copy
21
0.49 ms
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = ? AND ((t0 . deleted_at IS NULL ))
SELECT t0 . prop_id AS prop_id_1 , t0 . created_at AS created_at_2 , t0 . deleted_at AS deleted_at_3 , t0 . name AS name_4 , t0 . key AS key_5 , t0 . prop_type_id AS prop_type_id_6 FROM statement_props t0 INNER JOIN statement_items_props ON t0 . prop_id = statement_items_props . prop_id WHERE statement_items_props . item_id = 18 AND ((t0 . deleted_at IS NULL ));
Copy