Hello,
please check the attachment for details.
What i need is :
The sum of all the full_trade_amount for that route
The list of routes that share a customer with that route
The number customers shared with that route

The number of columns with data can vary so a route could share customers with many many routes so don't limit the number of columns for routes.

This is clearly a homework question. Maybe pay more attention in class? We would be more than willing to help you with a specific issue, but coming here and asking people to do it for you seems a bit lazy don't you think?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.