Skip to content

Coda to SQL


How many types of fruit are there?
Output:
2
Coda Formula Language
inventory.Filter(category.Contains("Fruit")).count()
inventory | category: Fruit
image.png
SQL
SELECT COUNT(*) AS count
FROM inventory
WHERE category = 'Fruit'

output: 2

OR, with table rows and count:

SELECT category, COUNT(*) AS count
FROM inventory
WHERE category = 'Fruit'
GROUP BY category

output: 2 & the table with 2 rows
image.png
inventory



Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.