I'm using PostgreSQL in my data ware house for reporting purposes, and for a certain report I have to show the sum of revenue for each month grouped by country. When i pulled the report the
shipping_country_id is showing as null for the last two months (previous months it seems fine - Facing the problem from 2019,April onwards).
When I cross checked there were about 36000 orders having the shipping country ID as null in the database, but in the Magento portal it is showing correctly.
So I'm not sure the table where which I'm taking the data is correct or not. Are there any alternative tables or columns to look for?
Any help will be deeply appreciated ! Thanks in advance.
Note: currently using magento 1.7 (in the process of upgrading it to 2)
Below is the query i'm using,
select shipping_address_id, billing_address_id FROM sales_flat_order WHERE entity_id = 537273; -- The result of this query is -- 1074074(shipping_address_id),1074073(billing_address_id) SELECT * FROM sales_flat_order_address WHERE entity_id = 1074074 OR entity_id = 1074073; -- The above query is showing nothing.