Skip to main content

Peliqan

Notion

Databases with least items

SQL query for Notion

Find the databases with the least number of items.

SELECT database_id, COUNT(*) AS items_count FROM database_items GROUP BY database_id ORDER BY items_count ASC LIMIT 1;

Notion data model

Notion
Databases

Notion
Database Items

Notion
Pages

Ready to get instant access to all your company data ?​

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.