Making a DB query

Run the data query:

1. ydb table query execute \
2. --query "SELECT season_id, episode_id, title \
3. FROM episodes \
4. WHERE series_id = 1 AND season_id > 1 \
5. ORDER BY season_id, episode_id \
6. LIMIT 3"

Making a DB query - 图1

Where:

  • --query: Query text.

Result:

1. ┌───────────┬────────────┬──────────────────────────────┐
2. | season_id | episode_id | title                        |
3. ├───────────┼────────────┼──────────────────────────────┤
4. | 2         | 1          | "The Work Outing"            |
5. ├───────────┼────────────┼──────────────────────────────┤
6. | 2         | 2          | "Return of the Golden Child" |
7. ├───────────┼────────────┼──────────────────────────────┤
8. | 2         | 3          | "Moss and the German"        |
9. └───────────┴────────────┴──────────────────────────────┘

Making a DB query - 图2