A SQL query goes into a bar, walks up to two tables and asks...
A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?"
This joke is a programming joke as well. The humor in this joke requires knowledge of SQL to make it funny.
SQL databases have the data stored in tables, and a query allows a programmer to get data out of a specific table. If the programmer wants data from multiple tables, he can JOIN the tables together and get the data from both at the same time.
So, the select statement's question is a pun. "Can I join you" could mean "may I sit down with you", or "can I get data from both of you at the same time."