Description Usage Functions Examples
Create SQL snippets to build SQL queries.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
FROM
: Create FROM SQL snippet with optional table aliases
WHERE
: Generate WHERE SQL snippet if cond
evaluates to TRUE, with
arguments to WHERE concatenated by AND
AND
: Concatenate arguments with AND
OR
: Concatenate arguments with OR
GROUP_BY
: Create GROUP BY
SQL snippet, arguments are column names
separated by commas
LIMIT
: Create LIMIT
SQL snippet
DESC
: Add DESC
or ASC
after column name
ORDER_BY
: Create ORDER BY
SQL snippet, arguments are column names
separated by commas
1 2 3 4 5 6 7 8 9 10 11 | FROM('table1', 'table2')
FROM(t1 = 'table1', t2 = 'table2')
WHERE('col1 IS NOT NULL')
WHERE(cond = TRUE, 'col1 = 2', 'col2 >= 10')
WHERE(cond = FALSE, 'col1 = 2', 'col2 >= 10')
AND(eq(id = 3, class = 'text_value'), geq(date = '2017-06-14'))
OR(eq(id = 9, id = 12), leq(id = 5))
GROUP_BY('col1', 'col2', 'col3')
LIMIT(10)
ORDER_BY('col1', 'col2', 'col3')
ORDER_BY(DESC('col1'), 'col2', ASC('col3'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.