Note that there are some explanatory texts on larger screens.

plurals
  1. POHow filter by a field with a join on two tables
    primarykey
    data
    text
    <p>how the filter the query i'm need filter by nombre i need a query. </p> <p>query = select userstats.email as email, count(intento) as Attempts, user.accesses as Accesses from userstats inner join user on user.email = userstats.email group by Email;</p> <pre><code>+---------------------------+----------+--------+ | email | Attemps |accesses| +---------------------------+----------+--------+ | felixcriv@gmail.com | 84 | 29 | | felixcriv@me.com | 1 | 0 | | geronimo_76@hotmail.com | 1 | 0 | | gramirezcarrero@gmail.com | 128 | 90 | +---------------------------+----------+--------+ 4 rows in set (0.00 sec) </code></pre> <p>the first table.</p> <pre><code>+-------------+-------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+-------------------+-----------------------------+ | email | varchar(55) | NO | PRI | NULL | | | names | varchar(60) | NO | | NULL | | | password | text | NO | | NULL | | | privileges | int(11) | YES | | 2 | | | accesses | int(11) | NO | | 0 | | | last_access | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | | logged | int(11) | YES | | 0 | | | ip_machine | varchar(35) | NO | | 0 | | | session_id | text | NO | | NULL | | | platform | text | NO | | NULL | | | status | int(11) | YES | | 0 | | +-------------+-------------+------+-----+-------------------+-----------------------------+ </code></pre> <p>11 rows in set (0.00 sec)</p> <p>the second table.</p> <pre><code>+-------------+-------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+-------------------+-----------------------------+ | iduserStats | int(11) | NO | PRI | NULL | auto_increment | | ip_machine | varchar(45) | NO | | NULL | | | email | varchar(45) | NO | | NULL | | | intento | int(11) | YES | | NULL | | | logged | int(11) | YES | | NULL | | | fechaHora | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | +-------------+-------------+------+-----+-------------------+-----------------------------+ 6 rows in set (0.00 sec) </code></pre> <p>i need draw a table similar:</p> <pre><code>+---------------------------+----------+--------+ | nombres | intentos |logeos | +---------------------------+----------+--------+ | name | 84 | 29 | | name2 | 1 | 0 | | name3 | 1 | 0 | | name4 | 128 | 90 | +---------------------------+----------+--------+ </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload