I have a large multisite install (500+ sites) and I am trying to figure out the best way to loop through all of the tables to select the value of a certain option name. I would like to do this purely in SQL.
use case example for single site:
SELECT option_value FROM wp_options WHERE option_name = 'blogname'
I would like to be able to do this for all 500 sites at once to return a list of all of the blog names.