I have two Mysql select queries:
select TTS.SSML, TTS_TAG.SORTID, TTS.VoiceId , TTS_TAG.TAGID FROM TTS left join TTS_TAG on TTS_TAG.TTSID = TTS.TTSID where TTS.MID = 15 select max(TTS_TAG.SORTID) as maxsort from TTS_TAG where TTS_TAG.TAGID = 1
I wish to combine both statements into one select statement, with the aggregate value added as a field in resulting output record?
The second aggregate select statement retrieves the maximum 'sort' for all records with the value 1 - if this second select yielded '3', then my desired record set would be:
# SSML, SORTID, VoiceId, TAGID, maxsort 'ssml data', '1', 'Geraint', '4', '3'