TSB logo

Obtain Top Partners

Obtaining top partners from trade data with multiple reporters, years and trade flows cannot be done directly from UN Comtrade.  However, it can be done using MS Access (or other database tools).  The first step is to download the raw data from UN Comtrade which will serve as your data input for your MS Access (or other database tools) query.

Data input:
Select few reporters in 2000-2002, export-import to/from all partners, and commodity=TOTAL.
As an example, please see database table Comtrade_trade_data in the attachment, which was imported from comtrade_trade_data.csv, downloaded from UN Comtrade (also found in the attachment).

SQL query:
See 'Get Top 5 Partners' query in the attached database template.  This will generate the top 5 partners by reporter, year, and flow against the Comtrade_trade_data table.  You can also view the report "Top 5 Partners" to see results of this query.


comtrade_trade_data.xls comtrade_trade_data.xls (784.00 KB, 4.2K views)
top partners.mdb top partners.mdb (1.00 MB, 2.3K views)

Related Links

Add Your Comments
Comments require login or registration.
Last Modified: 8 Years Ago
Last Modified By: comtrade_admin
Article not rated yet.
Article has been viewed 11.1K times.
Find Similar