# Related Sites > SQL Course >  how to arrange by joining tables

## Ares

i got a problem in executing the two different tables ...
for eg take those two tables given in the tutorial 
http://sqlcourse2.com/joins.html

i want to display the complete table with firstname lastname, ordered_date, items, price etc in ascending order of *names* ie. firstname... 
but when i do that i only list out differently...
please guide....

----------


## rmiao

What does your code look like?

----------


## ld_be

You must use order by
More information see http://sqlcourse2.com/orderby.html

Example:

SELECT *
FROM customer_info 
INNER JOIN purchases
ON customer_info.customer_number = purchases.customer_number
ORDER BY customer_info.firstname, customer_info.lastname;

----------

