SELECT
bookingReference,
SUM(amount)
FROM
rates_Booking
WHERE date BETWEEN '2016-09-01' AND '2016-09-30'
GROUP BY bookingReference;
SELECT booking_type.`name` as booking_type
FROM booking_type
LEFT JOIN booking ON booking_type.`name`=booking.booking_type;
i want to join both table. i want result like this:
column1 column2 column3
----------
bookingReference sum(amount) booking_type
----------
0993979-00 £500 booking
----------