I have the following tables:
list
- id - key
- name
item
- id - key
- name
list_item
- list_id - foreign key to list table
- item_id - foreign key to item table
I have the following query:
SELECT l.id, l.name
FROM list l, list_item li
WHERE l.id = li.list_id
I want to add to the result set, the count of items in the list. How do I do this?