liveBook · Manning

Select statement

A select statement is a language construct that retrieves selected data or chooses among alternative operations or cases according to the language's rules.

How 9 Manning books explain it

Learn Concurrent Programming with Go

A select statement is a Go control-flow construct that waits for and chooses among channel communication operations.

How it is used
Coordinates concurrent sends and receives across channels, including waiting, fallback work, timeouts, and shutdown signals.
How deep it goes
Works through blocking receives, default cases, sends, nil-case disabling, and practical channel coordination patterns.
Examples
Uses ticking channels, delayed messages, prime filtering, sales and expenses, temperature updates, games, and triangular numbers.
What you can do after
Apply it via Go select to multiplex channel work, avoid unwanted blocking, disable closed inputs, and stop goroutines.

Read how Learn Concurrent Programming with Go explains select statement →

Learn Go with Pocket-Sized Projects

A select statement is a Go control-flow construct that chooses among channel send, channel receive, and optional default cases that are ready to proceed.

How it is used
Coordinates maze-solving workers by receiving new paths or a quit signal, and keeps a WebAssembly callback program alive with an empty select.
How deep it goes
Explains channel cases, random choice among eligible cases, for-select loops, default checks, and guarded sends without descending into runtime internals.
Examples
Shows a maze dispatcher selecting between paths and quit, an explorer selecting between sending and quitting, and an empty select.
What you can do after
Practice/perform it by writing Go select loops that respond to cancellation while dispatching work.

Read how Learn Go with Pocket-Sized Projects explains select statement →

100 Go Mistakes and How to Avoid Them

A select statement is a Go control-flow construct that waits for and executes a communication operation from among channel cases.

How it is used
Uses select to wait on multiple channel operations while diagnosing mistaken priority, closure, and cancellation behavior.
How deep it goes
Works through ready-case selection and corrective receive loops, including default and nil-channel cases; does not examine runtime implementation.
Examples
Traces a message-and-disconnection loop that returns early, a two-channel merge that emits zeros, and a context-aware send and receive.
What you can do after
Diagnose/debug with it when a channel loop exits unpredictably, repeats zero values, or blocks despite cancellation.

Read how 100 Go Mistakes and How to Avoid Them explains select statement →

Go in Action, Second Edition

A select statement is a Go control construct that waits for and proceeds with a communication operation that is ready among multiple channel operations.

How it is used
Coordinates feed requests and ingestion errors in a responsive event loop.
How deep it goes
Shows a two-channel receive loop and describes cancellation, timeout, and default-case uses without implementing those select cases.
Examples
Uses a feed-ingestion loop that receives feed URLs or errors on separate channels.
What you can do after
Build it from scratch: write a Go event loop that responds to whichever of two channel operations is ready.

Read how Go in Action, Second Edition explains select statement →

Statistics Slam Dunk

A SELECT statement is an SQL query construct that specifies the fields or expressions to retrieve from a data source.

How it is used
Uses focused queries to retrieve NBA records and investigate data-quality issues before further analysis.
How deep it goes
Explains SELECT, FROM, WHERE, and AND through executable queries, while deferring reusable analysis objects to dplyr.
Examples
Demonstrates win-share extremes, blank teams, team-season records, and comparisons between gini3 and ranked gini4 data.
What you can do after
Apply it via sqldf() to retrieve selected fields, filter records, and inspect short result sets.

Read how Statistics Slam Dunk explains select statement →

Logs and Telemetry

A SELECT statement is a query construct that projects fields or computed values from a stream or tagged event source.

How it is used
Filters and projects records inside Fluent Bit stream processing before downstream output.
How deep it goes
Explains expression structure, tagged sources, configuration separation, functions, filtering, and observed output without covering query internals.
Examples
Uses random input records, tagged rand_value fields, aggregate functions, timestamps, WHERE filtering, and Fluent Bit configuration listings.
What you can do after
Build it from scratch by defining stream tasks, selecting tagged fields, applying functions or filters, and wiring Fluent Bit configuration.

Read how Logs and Telemetry explains select statement →

Python Concurrency with asyncio

select is a selector operation that waits for monitored resources to become ready or for a timeout and returns the resulting events.

How it is used
Drives an efficient socket event loop for concurrent applications and underlies asyncio’s handling of non-blocking sockets.
How deep it goes
Explains registration, readiness results, timeouts, and event-loop usage without descending into platform-specific notification internals.
Examples
Uses a non-blocking echo server with registered sockets, timed polling, and event dispatch.
What you can do after
Build it from scratch as a selector-based non-blocking socket loop serving multiple clients.

Read how Python Concurrency with asyncio explains select statement →

DuckDB in Action

A SELECT statement is an SQL statement that retrieves rows and expressions from one or more data sources.

How it is used
Uses SELECT to inspect, filter, transform, deduplicate, and pipeline data from tables or CSV relations.
How deep it goes
Explains practical composition with WHERE, DISTINCT, CASE, and external CSV sources while deferring detailed SELECT anatomy.
Examples
Demonstrates daily readings, distinct systems, remote CSV ingestion, generated URLs, and SELECT-fed INSERT statements.
What you can do after
Apply it via DuckDB to inspect readings, clean source values, deduplicate rows, and route query results into tables.

Read how DuckDB in Action explains select statement →

Go in Practice, Second Edition

How it is used
Coordinates channel communication while allowing a goroutine to stop waiting when a completion or timeout signal arrives.
How deep it goes
Explains readiness, waiting, default behavior, channel direction, and a complete timeout-driven echo implementation.
Examples
Uses a standard-input echo program that receives input through a channel and times out after thirty seconds.
What you can do after
Build interruptible channel workflows that handle data events and timeout events in one control structure.

Read how Go in Practice, Second Edition explains select statement →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.