JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
Table SQL Pack - User Guide
Get starts with the Table SQL Pack for Coda
More
Share
Explore
Get starts with the Table SQL Pack for Coda
Learn how to query your Coda tables using SQL.
Eric Koleda
Building blocks
Loading Tables
Query language
Joining tables
More information
Sample Data
Coda come with a ton of useful table features baked in, like lookups, formulas, filters, and more. But sometimes there’s nothing like good ‘ol fashioned SQL when you want to do some particularly complex queries.
Enter the Table SQL Pack!
Table SQL Pack, extend Coda with Table SQL - Coda
Coda come with a ton of useful table features baked in, like lookups, formulas, filters, and more. But sometimes there’s nothing like good ‘ol fashioned SQL whe
coda.io
Demo
If you’ve got a table of data in your doc...
Employees
Employees
1
Last Name
First Name
Title
Hire Date
Country
Last Name
First Name
Title
Hire Date
Country
1
Davolio
Nancy
Sales Representative
5/1/1992
USA
2
Fuller
Andrew
Vice President Sales
8/14/1992
USA
3
Leverling
Janet
Sales Representative
4/1/1992
USA
4
Peacock
Margaret
Sales Representative
5/3/1993
USA
5
Buchanan
Steven
Sales Manager
10/17/1993
UK
6
Suyama
Michael
Sales Representative
10/17/1993
UK
7
King
Robert
Sales Representative
1/2/1994
UK
8
Callahan
Laura
Inside Sales Coordinator
3/5/1994
USA
9
Dodsworth
Anne
Sales Representative
11/15/1994
UK
There are no rows in this table
You can use this Pack to query it with SQL syntax...
Queries
Queries
Description
Query
Result
Description
Query
Result
1
Count of employees
SELECT COUNT(*) FROM Employees;
[
9
]
2
Employees that start with “M”
SELECT `First Name`, Title
FROM Employees
WHERE `First Name` LIKE 'M%';
[
Margaret
Sales Representative
]
[
Michael
Sales Representative
]
3
Year of most recent hire, by country
SELECT
Country,
MAX(strftime('%Y'
,
`Hire Date`)) AS Year
FROM Employees
WHERE Title = 'Sales Representative'
GROUP BY Country;
[
UK
1994
]
[
USA
1993
]
4
Numbers of employees broken down by country and title
SELECT
Country,
Title,
COUNT(*) as '# Employees'
FROM Employees
GROUP BY Country, Title;
[
UK
Sales Manager
1
]
[
UK
Sales Representative
3
]
[
USA
Inside Sales Coordinator
1
]
[
USA
Sales Representative
3
]
[
USA
Vice President Sales
1
]
There are no rows in this table
Try it out!
Add your own queries to the table above to see the Pack in action.
Get started
First, install the Pack:
Install
Then read through the guide to learn how to use it in your doc.
Name
Description
Name
Description
1
Building blocks
An overview of the different building blocks included in the Pack (all of the different ways to run queries).
2
Loading Tables
How to specify which tables to load when performing a query.
3
Query language
Some information about the flavor of SQL you can use.
4
Joining tables
Tips and tricks for joining tables together.
5
More information
Additional information about the Pack.
There are no rows in this table
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.