Search code examples
surrealdb

How do you get the total row count of a surrealdb select query?


Using SurrealDB. is there a way that I can get the total amount of records for a query, like you would do in traditional SQL databases?

select count(*) from person

Solution

  • Yes, it would be

    SELECT count() FROM person GROUP BY count
    

    See more here: https://surrealdb.com/docs/surrealql/functions/count