This brief presents several new query processing techniques, called complex motion pattern queries, specifically designed for very large spatio-temporal databases of moving objects. The brief begins with the definition of flexible pattern queries, which are powerful because of the integration of variables and motion patterns. This is followed by a summary of the expressive power of patterns and flexibility of pattern queries. The brief then present the Spatio-Temporal Pattern System (STPS) and density-based pattern queries. STPS databases contain millions of records with information about mobile phone calls and are designed around cellular towers and places of interest. Density-based pattern queries capture the aggregate behavior of trajectories as groups. Several evaluation algorithms are presented for finding groups of trajectories that move together in space and time, i.e. within a predefined distance to each other. Finally, the brief describes a generic framework, called DivDB, for diversifying query results. Two new evaluation methods, as well as several existing ones, are described and tested in the proposed DivDB framework. The efficiency and effectiveness of all the proposed complex motion pattern queries are demonstrated through an extensive experimental evaluation using real and synthetic spatio-temporal databases. This clear evaluation of new query processing techniques makes Spatio-Temporal Database a valuable resource for professionals and researchers studying databases, data mining, and pattern recognition.