Group (by) example now has more than one column
This commit is contained in:
parent
370ff4f45d
commit
d7e5e3f050
1 changed files with 3 additions and 3 deletions
|
|
@ -418,7 +418,7 @@ Here's a big, complicated query. Note that Honey SQL makes no attempt to verify
|
||||||
[:< 1 2 3]
|
[:< 1 2 3]
|
||||||
[:in :f.e [1 (sql/param :param2) 3]]
|
[:in :f.e [1 (sql/param :param2) 3]]
|
||||||
[:between :f.e 10 20]])
|
[:between :f.e 10 20]])
|
||||||
(group :f.a)
|
(group :f.a :c.e)
|
||||||
(having [:< 0 :f.e])
|
(having [:< 0 :f.e])
|
||||||
(order-by [:b.baz :desc] :c.quux [:f.a :nulls-first])
|
(order-by [:b.baz :desc] :c.quux [:f.a :nulls-first])
|
||||||
(limit 50)
|
(limit 50)
|
||||||
|
|
@ -437,7 +437,7 @@ big-complicated-map
|
||||||
[:< 1 2 3]
|
[:< 1 2 3]
|
||||||
[:in :f.e [1 (sql/param :param2) 3]]
|
[:in :f.e [1 (sql/param :param2) 3]]
|
||||||
[:between :f.e 10 20]]
|
[:between :f.e 10 20]]
|
||||||
:group-by [:f.a]
|
:group-by [:f.a :c.e]
|
||||||
:having [:< 0 :f.e]
|
:having [:< 0 :f.e]
|
||||||
:order-by [[:b.baz :desc] :c.quux [:f.a :nulls-first]]
|
:order-by [[:b.baz :desc] :c.quux [:f.a :nulls-first]]
|
||||||
:limit 50
|
:limit 50
|
||||||
|
|
@ -454,7 +454,7 @@ big-complicated-map
|
||||||
OR (? < ? AND ? < ?)
|
OR (? < ? AND ? < ?)
|
||||||
OR (f.e in (?, ?, ?))
|
OR (f.e in (?, ?, ?))
|
||||||
OR f.e BETWEEN ? AND ?)
|
OR f.e BETWEEN ? AND ?)
|
||||||
GROUP BY f.a
|
GROUP BY f.a, c.e
|
||||||
HAVING ? < f.e
|
HAVING ? < f.e
|
||||||
ORDER BY b.baz DESC, c.quux, f.a NULLS FIRST
|
ORDER BY b.baz DESC, c.quux, f.a NULLS FIRST
|
||||||
LIMIT ?
|
LIMIT ?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue