SQL guides
Each guide solves one task on open_ef.factors_flat, shows the result, and names the column rule that makes the answer safe. Most pages are a single query; a few add a second one to check the first, and the quickstart walks several. Every query on these pages is executed against the live data before the page is published, so you can paste it as is. What you paste it into is a connection you arrange, and the copy you get can sit behind the website.
Pick the page whose title matches the question you have in hand. If you are new to the view, start with Quickstart: SQL and The model at a glance, then come back. If a guide warns about a rule you do not recognise (a default row, a top parent, a GWP basis), the linked data-model page explains it once for all guides.
Query with SQL
- Connect to factor search over SQL
- Quickstart: SQL
- Calculate emissions for a quantity
- Check that a decomposition sums to its parent
- Get the value for a past year
- Match a spend factor to your spend year
- Find a supplier-specific electricity factor
- Trace a served value back to its source line
- Add up factors across libraries
- See what was not imported, and why
- Keep only rows you may redistribute
- Pin a factor value to a release
- Which waste row to use when the route is unknown