What SQL means
SQL is a way of asking a database a precise question. A database is an organised collection of information. In Prism:- A table is a type of Yorlet record, such as Customers, Invoices, Units, or Tenancies.
- A row is one record, such as one Invoice or one Unit.
- A column is a detail on that record, such as its status, amount, or date.
- A query is the question written in SQL.
- A result is the set of rows Prism returns.
Prism only reads from a snapshot of your Yorlet data. A query cannot edit, delete, or send anything, so it is safe to
experiment.
Three ways to begin
Choose the route that feels most comfortable:- Use a template when a report is close to something common, such as rent roll, arrears ageing, or vacant Units.
- Ask the SQL assistant in Prism when you want to build or change a reusable query in the editor.
- Ask the Yorlet Assistant when you want to ask a question in plain English and see an answer without working in the editor.
Ask the SQL assistant in Prism
The field above the editor says Ask assistant to edit this query. It changes the SQL in the editor but does not run it. You decide when to click Run. To create a query with the SQL assistant, follow these steps:- Open Prism.
- Click New, or choose a template.
- In Ask assistant to edit this query, describe the report you need.
- Press Enter and wait for the SQL in the editor to change.
- Read the short explanation and check that the query matches your request.
- Click Run.
- Check the result, then ask for another change if needed.
- Give the query a clear name and click Save if you want to use it again.
- Show amounts in pounds instead of pence.
- Only include active Tenancies.
- Limit this to the last full calendar month.
- Group this by Building and add a total.
- Add the Customer’s name.
- Put the largest balance first.
- Remove email addresses from the result.
- Explain this query in plain English.
Write a useful prompt
A good prompt says what you want to see, which records to include, the time period, and how to organise the answer. You can write naturally; you do not need to use database terms. Try this pattern:Show [information] for [which records] during [time period]. Group or sort it by [category]. Include [useful columns].For example:
- Show active Tenancies ending in the next 90 days. Include the Building, Unit, end date, and monthly rent in pounds. Put the soonest end date first.
- Show open Invoices that are overdue. Group the outstanding balance into 0–30, 31–60, 61–90, and over 90 days.
- Compare successful Payment value by month for the last 12 complete months.
- Show available Units by Building, with bedroom count and default rent. Add one total row per Building.
- Show open maintenance issues by priority and Building. Exclude resolved issues.
Use Prism with the Yorlet Assistant
The Yorlet Assistant can draft Prism SQL and run the query in the chat. This is useful for one-off questions when you care about the answer more than the SQL. To ask the Yorlet Assistant, follow these steps:- Open Home, or open the Assistant side panel with ⌘ / (Control / on Windows).
- Ask a question and mention Prism, for example: Use Prism to show monthly Payment value for the last 12 months.
- The assistant shows the proposed Prism SQL and a short explanation.
- It runs the query and shows a Prism query result in the chat.
- Ask a follow-up, such as Now split that by Building or Show the values in pounds.
Using Prism through the Yorlet Assistant requires access to both products. Your message uses your Yorlet AI message
allowance, and drafting the SQL uses your Prism AI SQL allowance.
Check an AI-written query
AI is a helpful starting point, but you should still check that the answer makes sense before sharing or acting on it:- In the Prism editor, check Data as of so you know how recent the snapshot is.
- Check the filters. For example, confirm whether the query includes only
activeTenancies or all statuses. - Check the time period, especially phrases such as “last month” and “last 30 days”.
- Check the unit of money. Prism stores amounts in pence, so reports in pounds should divide by 100.
- Check the row count and whether the result says truncated.
- Compare a small sample with the relevant records in Yorlet.
- Remove personal information you do not need before downloading or sharing a CSV.
A few SQL words you may see
You can use Prism without learning these, but recognising them makes an AI-written query easier to review:select— chooses the columns or calculations to show.from— chooses the main table.where— filters which records are included.order by— sorts the result.group by— combines records into totals, such as one total per Building.count— counts records.sum— adds values together.join— connects related tables, such as Units to Buildings.as— gives a result column a clearer name.