I have two tables: 

```
Bookings (uid INTEGER, in_date DATE, paxname TEXT, acnumber INTEGER) 

```

and 

```
Accounts (uid INTEGER, uidbooking INTEGER, acnumber INTEGER, amount_charged DOUBLE)

```

I would like to sum all the charges from the accounts table that belong to a subset of bookings.

The first select chooses the bookings in a certain perdiod of time...

```
Select bookings.uid, bookings.acnumber
WHERE bookings.status = 'checkedin' 
AND bookings.Indate > '2017-07-01'

```

Now the SECOND select should look for the charges of those bookings and SUM all the amounts of the accounts belonging to those previously selected bookings... 

```
Select SUM(amount_charged) FROM Accounts WHERE acnumber = bookings.acnumber

```

So, how can I get all the results with the bookings uid, account number AND in the same row, the sum of the account charges... ?

Thnks