How can one get the count of a relationship? For ...
# help
s
How can one get the count of a relationship? For example...
Copy code
...from('notes').select('
 *,
 tasks({ count: 'exact', head: true })
'),
n
Hello @stnmonroe! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
s
@stnmonroe You can do it like:
n
stnmonroe (2022-04-07)
s
Copy code
js
...from('notes').select('
 *,
 tasks(count)
'),
s
Thank you sooooo much!