Combine Mysql limit query
You need to convert your second query to a subquery and join it with the main query. To pass the learning outcome into the inner query you need to use the user-defined variable:

SELECT 
    sc.studentsisid,
    sc.coursename,
    sc.learningoutcomeid,
    sc.learningoutcomename,
    count(sc.RecordID) as assessmentcount, 
    count(if(sc.outcomescore &gt;= 3,sc.outcomescore, NULL)) as over3,
    avg(sc.outcomescore) as scoreavg,
    l.recentover3,
    l.recentscoreavg 
FROM studentscores sc
INNER JOIN (
    SELECT studentsisid,
        learningoutcomeid,
        count(if(outcomescore &gt;= 3,outcomescore, NULL)) as recentover3, 
        avg(outcomescore) as recentscoreavg 
    FROM (
          SELECT 
              (@studentsisid := studentsisid) as studentsisid,
              (@coursename := coursename) as courcename,
              (@learningoutcomeid := learningoutcomeid) as learningoutcomeid,
               @num := if(@studentsisid = studentsisid and 
                          @coursename = coursename and 
                          @learningoutcomeid = learningoutcomeid, 
                       @num + 1, 1) as row_number,
               outcomescore
          FROM studentscores 
          ORDER BY studentsisid, coursename, learningoutcomeid, recordid DESC) as r
        where row_number &lt;= 3) AS l
ON sc.studentsisid = l.studentsisid AND sc.learningoutcomeid = l.learningoutcomeid
WHERE sc.studentsisid LIKE '$studentid' AND sc.coursename='$coursename'
GROUP BY sc.studentsisid, sc.coursename, sc.learningoutcomeid  
ORDER BY sc.studentname, sc.learningoutcomename