code: public TileResultSet queryByTileGrid(TileGrid tileGrid, long zoomLevel,
  			String orderBy) {
  
  		TileResultSet tileCursor = null;
  
  		if (tileGrid != null) {
  
  			StringBuilder where = new StringBuilder();
  
  			where.append(buildWhere(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel));
  
  			where.append(" AND ");
  			where.append(buildWhere(TileTable.COLUMN_TILE_COLUMN,
  					tileGrid.getMinX(), ">="));
  
  			where.append(" AND ");
  			where.append(buildWhere(TileTable.COLUMN_TILE_COLUMN,
  					tileGrid.getMaxX(), "<="));
  
  			where.append(" AND ");
  			where.append(buildWhere(TileTable.COLUMN_TILE_ROW,
  					tileGrid.getMinY(), ">="));
  
  			where.append(" AND ");
  			where.append(buildWhere(TileTable.COLUMN_TILE_ROW,
  					tileGrid.getMaxY(), "<="));
  
  			String[] whereArgs = buildWhereArgs(new Object[] { zoomLevel,
  					tileGrid.getMinX(), tileGrid.getMaxX(), tileGrid.getMinY(),
  					tileGrid.getMaxY() });
  
  			tileCursor = query(where.toString(), whereArgs, null, null, orderBy);
  		}
  
  		return tileCursor;
  	}
docs: Query by tile grid and zoom level
  
  @param tileGrid
  tile grid
  @param zoomLevel
  zoom level
  @param orderBy
  order by
  @return cursor from query or null if the zoom level tile ranges do not
  overlap the bounding box
  @since 1.2.1