4 <stmt name="select_0" sql="SELECT strftime('%s','now')" kind="select" cardinality="1">
7 <value name="_0" type="Text"/>
10 <stmt name="create_test" sql="CREATE TABLE test (x INT, `key` VARBINARY(200))" kind="create" target="test" cardinality="0">
14 <stmt name="select_2" sql="SELECT * FROM test WHERE x IS NOT NULL" kind="select" cardinality="n">
17 <value name="x" type="Int"/>
18 <value name="key" type="Text"/>
21 <stmt name="create_index_key" sql="CREATE INDEX `key` ON test(`key`(20))" kind="create_index" target="key" cardinality="0">
25 <stmt name="select_4" sql="SELECT avg(x) FROM test" kind="select" cardinality="1">
28 <value name="_0" type="Float"/>
31 <stmt name="select_5" sql="SELECT count(*) FROM test" kind="select" cardinality="1">
34 <value name="_0" type="Int"/>
37 <stmt name="select_6" sql="SELECT x FROM test WHERE @_0 >= `key` ORDER BY `key` DESC LIMIT 1" kind="select" cardinality="0,1">
39 <value name="_0" type="Text"/>
42 <value name="x" type="Int"/>
45 <stmt name="select_7" sql="SELECT x FROM test WHERE `key` < @_0" kind="select" cardinality="n">
47 <value name="_0" type="Text"/>
50 <value name="x" type="Int"/>
53 <stmt name="create_appointments" sql="CREATE TABLE appointments (alert_at DATETIME)" kind="create" target="appointments" cardinality="0">
57 <stmt name="insert_appointments_9" sql="INSERT INTO `appointments` (
 `alert_at`
) VALUES (
 NOW() + INTERVAL @delay SECOND
)" kind="insert" target="appointments" cardinality="0">
59 <value name="delay" type="Int"/>
63 <stmt name="select_10" sql="SELECT SUM(CASE WHEN x > 10 THEN 1 ELSE 0 END) FROM test" kind="select" cardinality="1">
66 <value name="_0" type="Int"/>
69 <stmt name="create_issue14" sql="CREATE TABLE issue14 (x integer)" kind="create" target="issue14" cardinality="0">
73 <stmt name="insert_issue14_12" sql="INSERT INTO issue14 (x) VALUES (@x)" kind="insert" target="issue14" cardinality="0">
75 <value name="x" type="Int"/>
79 <stmt name="insert_issue14_13" sql="INSERT INTO issue14 SET x = @x" kind="insert" target="issue14" cardinality="0">
81 <value name="x" type="Int"/>
85 <stmt name="insert_issue14_14" sql="INSERT INTO issue14 (x) SELECT @x" kind="insert" target="issue14" cardinality="0">
87 <value name="x" type="Int"/>
91 <stmt name="insert_test_15" sql="INSERT INTO test VALUES (20, 'twenty') ON DUPLICATE KEY UPDATE x = x + @_0" kind="insert" target="test" cardinality="0">
93 <value name="_0" type="Int"/>
97 <stmt name="insert_test_16" sql="INSERT INTO test VALUES (20, 'twenty') ON DUPLICATE KEY UPDATE x = VALUES(x) + @_0" kind="insert" target="test" cardinality="0">
99 <value name="_0" type="Int"/>
103 <stmt name="insert_test_17" sql="INSERT INTO test VALUES (20, $$twenty$$)" kind="insert" target="test" cardinality="0">
107 <stmt name="insert_test_18" sql="INSERT INTO test VALUES (200,
$$twenty
times
ten$$)" kind="insert" target="test" cardinality="0">
111 <stmt name="select_19" sql="SELECT $function$
BEGIN
 RETURN ($1 ~ $q$[\t\r\n\v\\]$q$);
END;
$function$" kind="select" cardinality="1">
114 <value name="_0" type="Text"/>
117 <stmt name="insert_test_20" sql="INSERT INTO `test` (`x`, `key`) VALUES
(1, 'one'),
(2, 'two'),
(3, 'three')" kind="insert" target="test" cardinality="0">
121 <stmt name="insert_test_21" sql="INSERT INTO test VALUES
(1, 'one'),
(2, 'two'),
(3, 'three')" kind="insert" target="test" cardinality="0">
125 <stmt name="issue47" sql="SELECT count(*) > 0 FROM test" kind="select" cardinality="1">
128 <value name="_0" type="Bool"/>
131 <stmt name="select_23" sql="SELECT count(*) * avg(x) FROM test" kind="select" cardinality="1">
134 <value name="_0" type="Float"/>
137 <stmt name="issue45" sql="INSERT INTO test VALUES
(1, @one),
(2, @two),
(3, @one)" kind="insert" target="test" cardinality="0">
139 <value name="two" type="Text"/>
140 <value name="one" type="Text"/>
144 <stmt name="insert_appointments_25" sql="INSERT INTO `appointments` ( `alert_at`) VALUES (@alert)" kind="insert" target="appointments" cardinality="0">
146 <value name="alert" type="Datetime"/>
150 <stmt name="insert_appointments_26" sql="INSERT INTO `appointments` ( `alert_at`) VALUES (FROM_UNIXTIME(@alert))" kind="insert" target="appointments" cardinality="0">
152 <value name="alert" type="Int"/>
156 <stmt name="count_x" sql="SELECT COUNT(x) FROM test" kind="select" cardinality="1">
159 <value name="_0" type="Int"/>
162 <stmt name="count_distinct" sql="SELECT COUNT(DISTINCT x), SUM(DISTINCT x) FROM test" kind="select" cardinality="1">
165 <value name="_0" type="Int"/>
166 <value name="_1" type="Int"/>
169 <stmt name="issue54_mysql" sql="SELECT 0 <=> 0, 0 <=> null, null <=> 0, null <=> null" kind="select" cardinality="1">
172 <value name="_0" type="Bool"/>
173 <value name="_1" type="Bool"/>
174 <value name="_2" type="Bool"/>
175 <value name="_3" type="Bool"/>
178 <stmt name="issue54_sqlite" sql="SELECT 0 is 0, 0 is null, null is 0, null is null" kind="select" cardinality="1">
181 <value name="_0" type="Bool"/>
182 <value name="_1" type="Bool"/>
183 <value name="_2" type="Bool"/>
184 <value name="_3" type="Bool"/>
187 <stmt name="issue54_sql" sql="SELECT 42 is not distinct from null, 42 is distinct from null" kind="select" cardinality="1">
190 <value name="_0" type="Bool"/>
191 <value name="_1" type="Bool"/>
194 <stmt name="create_workareas" sql="CREATE TABLE workareas (work_id int, about text)" kind="create" target="workareas" cardinality="0">
198 <stmt name="delete_test_33" sql="delete from test
where x in (@x1, @x2)
 and not exists (select 1 from workareas where work_id = test.x)" kind="delete" target="test" cardinality="0">
200 <value name="x1" type="Int"/>
201 <value name="x2" type="Int"/>