🙏 We need your help! SQLtest.online has no ads and lives only on donations. Even a small amount helps. Donate now →
SQL code copied to buffer
Task 75:

Full-Text Search over Airports

PostgreSQL
The search box on the airline website should find airports by any word of the airport name or the city: "international", "moscow", "sochi".
Prepare the airports table for it:
1. add the column search of type tsvector, generated and stored from airport_name and city with the english configuration;
2. index this column with a GIN index.
Expected result Columns: 6 · Rows: 1
column_name data_type generated index_method international_matches moscow_matches

Write your query below and click "Check it!". Tables are described in the right pane.

Tutorial

By checking a query, you agree that it is stored without your account details and may be included in anonymized datasets, including for AI training. Learn more

The query result will appear here. Ctrl+Enter - Run query