Mysql
 sql >> Base de données >  >> RDS >> Mysql

Comment reformuler une requête sql

Est-ce que quelque chose comme ça fonctionnerait ?

SELECT
    max(a.field_date_and_time_value2) as last_time
    , b.uid
FROM field_data_field_date_and_time a
    INNER JOIN
        node b
    ON
        /* this piece might be wrong. what is the relationship between the first table and the second one? */
        b.nid = '".$node->nid."'
where
    a.field_date_and_time_value2 > '".$today."' AND
    b.uid = $node->nid