+(deftest :syntax/relational/3
+ (clsql:sql [>= [baz] [beep]])
+ "(BAZ >= BEEP)")
+
+(deftest :syntax/relational/4
+ (clsql:sql [< [baz] [beep]])
+ "(BAZ < BEEP)")
+
+(deftest :syntax/relational/5
+ (clsql:sql [= [baz] [beep]])
+ "(BAZ = BEEP)")
+
+(deftest :syntax/relational/6
+ (clsql:sql [<> [baz] [beep]])
+ "(BAZ <> BEEP)")
+
+
+(deftest :syntax/between/1
+ (clsql:sql [between [- [foo] 1] [* [bar] 5] [/ [baz] 9]])
+ "(FOO - 1) BETWEEN (BAR * 5) AND (BAZ / 9)")
+
+(deftest :syntax/between/2
+ (clsql:sql [not [between [- [foo] 1] [* [bar] 5] [/ [baz] 9]]])
+ "(NOT ((FOO - 1) BETWEEN (BAR * 5) AND (BAZ / 9)))")
+
+
+(deftest :syntax/arithmetic/1
+ (clsql:sql [+ [foo bar] [baz]])
+ "(FOO.BAR + BAZ)")
+
+(deftest :syntax/arithmetic/2
+ (clsql:sql [- [foo bar] [baz]])
+ "(FOO.BAR - BAZ)")
+
+(deftest :syntax/arithmetic/3
+ (clsql:sql [/ [foo bar] [baz]])
+ "(FOO.BAR / BAZ)")
+
+(deftest :syntax/arithmetic/4
+ (clsql:sql [* [foo bar] [baz]])
+ "(FOO.BAR * BAZ)")
+
+(deftest :syntax/arithmetic/5
+ (clsql:sql [- [foo bar]])
+ "(- (FOO.BAR))")
+
+(deftest :syntax/arithmetic/6
+ (clsql:sql [* 2 3])
+ "(2 * 3)")
+
+
+(deftest :syntax/substr/1
+ (clsql:sql [substr [hello] 1 4])
+ "SUBSTR(HELLO,1,4)")
+
+(deftest :syntax/substring/1
+ (clsql:sql [substring [hello] 1 4])
+ "SUBSTRING(HELLO,1,4)")
+
+
+(deftest :syntax/concat/1
+ (clsql:sql [|| [foo] [bar] [baz]])
+ "(FOO || BAR || BAZ)")
+
+(deftest :syntax/concat/2
+ (clsql:sql [concat [foo] [bar]])
+ "CONCAT(FOO,BAR)")
+
+
+(deftest :syntax/pattern/1
+ (clsql:sql [like [foo] "%v"])
+ "(FOO LIKE '%v')")
+
+(deftest :syntax/pattern/2
+ (clsql:sql [not [like [foo] "%v"]])
+ "(NOT ((FOO LIKE '%v')))")
+
+
+(deftest :syntax/distinct/1
+ (clsql:sql [distinct [foo bar :string]])
+ "DISTINCT FOO.BAR")
+
+(deftest :syntax/distinct/2
+ (clsql:sql [distinct [foo :string] [bar :integer]])
+ "DISTINCT FOO, BAR")
+
+
+(deftest :syntax/order-by/1
+ (clsql:sql [order-by [foo]])
+ "ORDER BY FOO")
+
+(deftest :syntax/group-by/1
+ (clsql:sql [group-by [foo]])
+ "GROUP BY FOO")
+
+(deftest :syntax/group-by/2
+ (clsql:sql
+ (clsql-sys::make-query [foo] [bar] [count [foo]]
+ :from [table]
+ :group-by '([foo] [bar])
+ :order-by '([foo] [bar])))
+ "SELECT FOO,BAR,COUNT(FOO) FROM TABLE GROUP BY FOO,BAR ORDER BY FOO,BAR")
+
+
+(deftest :syntax/coalesce/1
+ (clsql:sql [coalesce [foo] [bar] "not specified"])
+ "COALESCE(FOO,BAR,'not specified')")
+
+(deftest :syntax/coalesce/2
+ (clsql:sql [nvl [foo] "not specified"])
+ "COALESCE(FOO,'not specified')")
+
+(deftest :syntax/nvl/1
+ (clsql:sql [nvl [foo] "not specified"])
+ "COALESCE(FOO,'not specified')")
+
+
+
+(deftest :syntax/sets/1
+ (clsql:sql [union [select [foo] :from [bar]] [select [baz] :from [bar]]])
+ "SELECT FOO FROM BAR UNION SELECT BAZ FROM BAR")
+
+(deftest :syntax/sets/2
+ (clsql:sql [intersect [select [foo] :from [bar]] [select [baz] :from [bar]]])
+ "SELECT FOO FROM BAR INTERSECT SELECT BAZ FROM BAR")
+
+(deftest :syntax/sets/3
+ (clsql:sql [except [select [foo] :from [bar]] [select [baz] :from [bar]]])
+ "SELECT FOO FROM BAR EXCEPT SELECT BAZ FROM BAR")
+
+(deftest :syntax/sets/4
+ (clsql:sql [minus [select [foo] :from [bar]] [select [baz] :from [bar]]])
+ "SELECT FOO FROM BAR MINUS SELECT BAZ FROM BAR")
+