आप Left Join
कर सकते हैं इसके लिए और चेक करें SQLFiddle
यहाँ।
SELECT
p.*,
MATCH (title) AGAINST ('text' IN BOOLEAN MODE) AS score ,
COUNT(li.id) AS total_likes
FROM photos p
LEFT JOIN likes li
ON p.id = li.photo_id
WHERE MATCH (p.title) AGAINST ('text' IN BOOLEAN MODE)
GROUP BY
li.photo_id
ORDER BY
score , total_likes DESC