JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Coda to SQL
Coda to SQL
SQL Adventures
Projects
Links & Resources
More
Share
Explore
Coda to SQL
How many types of fruit are there?
Output:
2
Coda Formula Language
inventory
.
Filter
(
category
.
Contains
(
"Fruit"
)
)
.
count
(
)
inventory | category: Fruit
inventory | category: Fruit
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
inventory
inventory
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
Ctrl
P
) instead.