I am trying to open another table and get some values inside of an inner join
The problem is that I have tons of errors and it can’t run. I guess that I have somthing wrong in the syntax. Here my code is:
INNER JOIN (SELECT (min(TA_Timestamp)as timestampmin,ta_wp_id as ta_wp_id) as test
ON test.ta_wp_id = p17.PA_WP_ID
FROM ta_tasks WHERE test.ta_wp_id = p17.pa_wp_id)
The table I’m trying to get the results is named ta_tasks it contains a field named ta_wp_id. The other table is named parameters and it contains a row named pa_wp_id
what I need is to get the min(TA_Timestamp) from ta_tasks when ta_wp_id = pa_wp_id
Is there a solution?
Looks like you’re missing a
GROUP BYand your syntax is a little off. Try this: