Machine-to-machine (M2M) communication is one of the key technologies to realize Internet of Things (IoT). Since IoT applications are mainly for smart sensing, such as metering, home surveillance, disaster detection, and e-health, their special sensing/uploading behaviors will result in periodic and/or event-driven small data transmissions, which may potentially decrease the radio resource efficiency. On the other hand, the widespread deployment of IoT raises the concurrent massive connectivity of IoT devices. How to solve these two problems is a critical issue. In this paper, we investigate an uplink resource allocation problem which considers the periodic, event-driven, and query-based IoT traffic behaviors over LTE-M. The proposed approach takes advantage of data aggregation and both spatial and temporal reuse. Our solution exploits long-term static scheduling for periodic data to ensure the latency and data rate, and employs short-term dynamic scheduling for event-driven, query-based data to improve transmission efficiency. Therefore, both small data and massive connectivity problems are relieved. Extensive simulation results show that the proposed scheme can improve resource efficiency and enlarge network capacity effectively.