Phoenix SQL help please

Open to all! Ask other shopowners for help.
Post Reply
Yahalimu
Member
Posts: 29
Joined: Mon Oct 26, 2020 1:27 pm
Phoenix Version: v1.0.5.0
Has thanked: 4 times
Been thanked: 1 time

Phoenix SQL help please

Post by Yahalimu »

Hi.
I need SQL queries to retrieve the country ISO codes(2 char) for customers billing address and order delivery addresses, by order_id.
Can anyone help?

As an aside, I've put the some of the schema and extra info into GPT4, works well to retrieve order info and sales stats etc. Creates SQL and I query from the website. Good for basic stuff.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Yahalimu
Member
Posts: 29
Joined: Mon Oct 26, 2020 1:27 pm
Phoenix Version: v1.0.5.0
Has thanked: 4 times
Been thanked: 1 time

Re: Phoenix SQL help please

Post by Yahalimu »

Apologies, I realised I could just ask the AI, it came back with:
SELECT c.countries_iso_code_2 FROM orders o JOIN countries c ON o.billing_country = c.countries_name WHERE o.orders_id = 1234
Apologies for the bandwidth.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply