How to get data from three different tables
This query:


Uses ANSI JOIN (LEFT, INNER, ...)
Uses LEFT JOIN for each table in order to count Sessions IPs without Input or Downloads
Uses DISTINCT for each COUNT in order to remove duplicates added by the JOIN between tables
Counts values for totals and counts ids for unique counts


Query:

SELECT s.ip
    , COUNT(DISTINCT s.id)
    , COUNT(DISTINCT i.id) as TotalInputs
    , COUNT(DISTINCT i.input) as UniqInputs
    , COUNT(DISTINCT d.id) as files
    , COUNT(DISTINCT d.shasum) as Uniqfiles 
FROM sessions s
LEFT JOIN input i
    ON s.id = i.session
LEFT JOIN downloads d
    ON s.id = d.session 
GROUP BY s.ip;


SQL Fiddle

Output:

ip  | COUNT(DISTINCT s.id)  | TotalInputs   | UniqInputs    | files | Uniqfiles
IP2 |       1               |       3       |   2           | 1     |   1
IP3 |       3               |       5       |   4           | 3     |   2