On type of query I always have to run when moving a website from its test environment to its live environment is to replace the test domain in all content pages with the live domain. With SQL this can be easily done with the
REPLACE(text, search, substitution) function.
UPDATE some_table SET some_field = REPLACE(some_field, 'test.example.com', 'example.com')
This updates all records in the table
some_table and replaces
example.com in the field
Knowing which SQL functions exist can really help a lot and save time to update data.