I found this query here:
SELECT contacts.client_id, contacts.first_name, contacts.last_name, contacts.email, contacts.address1, contacts.city, contacts.zip, contacts.country, contact_numbers.number
FROM contacts
INNER JOIN contact_numbers
ON contacts.client_id=contact_numbers.contact_id
ORDER BY contacts.client_id;
I figured that would be fine but I'm seeing some oddities:
Not all clients are being exported. The export has 70 rows of clients BUT 10 clients were repeated in 2 rows so only 60 unique clients were exported. But I have a total of 77 clients (61 active, 16 inactive).
Some client phone numbers are wrong. I've found 2 phone numbers that are different from that client's contact info. Some are correct, but I don't want to check every single row unless I decide to forget the export to manually check & fix the phone numbers.
I also want to export the tax & Stripe IDs for clients but I'm not sure how to connect client_settings.value & accounts_cc.client_reference_id to the client without messing it up like the phone numbers.