SELECT *
FROM( SELECT ROW_NUMBER()OVER(PARTITION BY m_type order by m_id) AS Num,*
FROM m_data) as temp
WHERE Num <= 100
SELECT *
FROM( SELECT ROW_NUMBER()OVER(PARTITION BY m_type order by m_id) AS Num,*
FROM m_data) as temp
WHERE Num <= 100