Table: {airtable_record}
Query data from Airtable tables. A table is automatically created for each tables on each bases available.
For instance, if you have 2 bases with 2 tables on each, then this plugin will create 4 tables:
- baseid1_table_name1
- baseid1_table_name2
- baseid2_table_name1
- baseid2_table_name2
Examples
Get all IDs
select idfrom baseid_design_projects;
Get a record by ID
select *from baseid_design_projectswhere id = 'recdTpx4c0kPPDTtf';
Get the 5 last created rows
select idfrom baseid_design_projectsorder by created_time desclimit 5;
Expand Client
field to list clients associated with projects
select d.id as project_id, cid as client_idfrom baseid_design_projects as d, jsonb_array_elements_text(d.fields -> 'Client') as cid;
Get full information for each client associated with a project
select d.id as project_id, c.id as client_id, d."Name" as project_name, c."Name" as client_name, c."About" as client_descriptionfrom baseid_design_projects as d, jsonb_array_elements_text(d."Client") as cid, baseid_clients as cwhere c.id = cid;
List projects using the formula filter
select "Name", "Kickoff date"from baseid_design_projectswhere filter_formula = 'IS_AFTER({Kickoff date}, "2020-10-01")';