@Override
    public PreparedStatement getStatement() throws SQLException
    {
        Connection connection = getConnection();

        if (connection != null)
            return connection.prepareStatement("select * from questions where type=? order by random() limit ?");
        else
            return null;
    }