This section covers advanced SQLY features, including complex filtering, sorting, joins, pagination, and more.
SQLY supports combining multiple conditions using and, or, and not.
query:
select: [id, name, email]
from: users
where:
and:
- status: active
- role: admin
- last_login:
gte: "2024-01-01"query:
select: [order_id, customer, total_price, status]
from: orders
where:
or:
- status: completed
- status: shippedSorting results and limiting the number of returned rows.
query:
select: [id, name, last_login]
from: users
order_by: last_login DESC
limit: 20query:
select: [id, name, created_at]
from: users
limit: 10
offset: 10SQLY supports joining multiple tables.
query:
select: [orders.order_id, customers.name, orders.total_price]
from: orders
join:
customers:
on: orders.customer_id = customers.idPerform searches based on text patterns.
query:
select: [id, name, description]
from: products
where:
name:
like: "%wireless%"query:
select: [id, title, content]
from: articles
where:
content:
full_text_search: "machine learning"- Use
and,or,notfor complex filtering. order_bysorts results.limitandoffsetenable pagination.joinallows querying across tables.likeandfull_text_searchsupport text searches.