Skip to content
Table SQL Pack - User Guide
Share
Explore

icon picker
Get starts with the Table SQL Pack for Coda

Learn how to query your Coda tables using SQL.
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!

Demo

If you’ve got a table of data in your doc...
Employees
1
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
0
Description
Query
Result
1
Count of employees
SELECT COUNT(*) FROM Employees;
[9]
2
Employees that start with “M”
SELECT `First Name`, TitleFROM Employees WHERE `First Name` LIKE 'M%';
[MargaretSales Representative][MichaelSales Representative]
3
Year of most recent hire, by country
SELECT Country, MAX(strftime('%Y',`Hire Date`)) AS YearFROM Employees WHERE Title = 'Sales Representative' GROUP BY Country;
[UK1994][USA1993]
4
Numbers of employees broken down by country and title
SELECT Country, Title, COUNT(*) as '# Employees'FROM EmployeesGROUP BY Country, Title;
[UKSales Manager1][UKSales Representative3][USAInside Sales Coordinator1][USASales Representative3][USAVice President Sales1]
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:
Then read through the guide to learn how to use it in your doc.
Name
Description
1
An overview of the different building blocks included in the Pack (all of the different ways to run queries).
2
How to specify which tables to load when performing a query.
3
Some information about the flavor of SQL you can use.
4
Tips and tricks for joining tables together.
5
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 (
CtrlP
) instead.