mysql inner join limit 1 or grab the last (within one inner join)

Discussion in 'MySQL' started by xbat, Nov 29, 2018.

  1. #1
    I know this is not possible but this is what I want to do...

    inner join tabbble ON concat ( B.`planted`,'-',`withshovel`.`color`)=( tabbble.`entireshvoelcolor` AND tabbble.`Date` >= DATE_SUB(CURDATE(), INTERVAL 400 DAY) ORDER BY tabbble.`Date` DESC limit 1 )

    I did try a sub query but
    inner join tabbble ON concat ( B.`planted`,'-',`withshovel`.`color`)=(sub query) - but I need it to match up with concat ( B.`planted`,'-',`withshovel`.`color`)

    thanks
     
    xbat, Nov 29, 2018 IP