Which orders are urgent?
WHICH Order has (Order Priority:'1-URGENT')Name the object. Add a condition. That is a complete query.
From a question to a query.
With meaning intact.
NexQL brings natural-language readability to deterministic database queries. Give your agents the language of your domain. Let FactEngine translate it to SQL or Cypher.
What films are playing at the Rialto?
WHICH Film is showing at (Cinema:'Rialto') on (DateTime:TODAY)WHICH selects Film. The named cinema constrains the question. No RETURN clause needed.
What films did Simon book?
WHICH Film has A Session
THAT has A Booking
THAT is for (Person:'Simon')Follow the relationships in the model. A introduces a related object; THAT continues the reading.
Show films, cinemas and times.
WHICH Film is showing at WHICH Cinema at WHICH DateTimePut WHICH in front of each object type you want returned.
From a simple lookup to a sales analysis. See how much you can ask with a few words and the relationships in your model.
WHICH Order has (Order Priority:'1-URGENT')Name the object. Add a condition. That is a complete query.
WHICH Customer made AN Order
THAT is for WHICH Part
AND THAT Order was on (Date:'2026-09-26')Return customers and parts together. WHICH makes the selection explicit.
WHICH Film has A Session
THAT has A Booking
THAT is for (Person:'Simon')Follow a readable path through the model, from a film to the person who booked.
WHICH PizzaTopping is for A PizzaNameHasTopping
THAT has (PizzaName:'Margherita')Use the names and relationship readings in the pizza model to ask a specific question.
WHICH Seat is in A Row
THAT is in (Cinema:'Great Western Cinema')
RETURN COUNT(*)Add RETURN when you want an aggregate instead of the default identifying fields.
WHICH Sales Order has WHICH Sold To Customer City
AND WHICH Line Total
RETURN SalesOrder.SldToCustCity, SalesOrder.SlsLineTotal.SUM
GROUP BY SalesOrder.SldToCustCityKeep the domain question readable while expressing exactly how totals should be grouped.
Each example uses its domain’s model vocabulary. RETURN is optional.
Explore more query examples →An agent needs a clear way to express what it wants. A database needs a precise query. NexQL connects the two.
Object names and relationship readings already sound like the question. Give the AI your model vocabulary and examples to guide query generation.
See which objects an agent selects, which relationships it follows, and which conditions it applies. Keep the question visible in the query.
NexQL has a formal grammar. FactEngine resolves the query against a model and translates it to SQL or Cypher for the target database.
Keep domain concepts in the agent’s context, and database mappings in FactEngine. The model connects the names and relationships in a query to the data behind them.
Explore the agent workflow →Ask for an object. Follow a relationship. Select another object. A query can return useful results without a RETURN clause.
WHICH FilmReturn the films.
WHICH Film is showing at WHICH CinemaReturn the films and the cinemas where they’re showing.
RETURN for explicit fields and aggregates.Built on Object-Role Modeling and Fact-Based Modelling, NexQL asks questions using the concepts and relationships in your domain.
Meet the foundations →Developed for FactEngine. Explore the language and help shape what comes next.