Here is my [SQL Fiddle](http://sqlfiddle.com/#!9/9dba4ea/5)

I am joining `user` and `address` table for now. Now i need to take the count of the logs table where `in_time` and `out_time` is filled

Here is my SQL Query that i have so far

```
select u.id, u.name, a.address from user u 
left join address a on u.id = a.user_id
where u.id = 1

```

I.e., Output should be like this

```
id  name    address  total_count proper_count
1   Alpha   Chennai  4           3

```