{
    "having":"SELECT column_name(s) FROM table_name GROUP BY column_name(s) HAVING condition\n\nSELECT DEP_ID, COUNT(*) AS 'NUM_EMPLOYEES', AVG(SALARY) AS 'AVG_SALARY' FROM EMPLOYEES GROUP BY DEP_ID HAVING count(*) < 4 ORDER BY AVG_SALARY;\n\nHAVING clause is used in conjunction with GROUP BY clause in collaboration with the SELECT statement in order to ﬁlter the data as per the given condition and then group as per identical values of a speciﬁed parameter.",
    "group by":"SELECT column_name(s) FROM table_name GROUP BY column_name(s)\n\nSELECT dep_id, COUNT(*) FROM employees GROUP BY dep_id; \n\nThis returns the department IDs and the number of employees in them, grouped by the department IDs.\n\nGROUP BY clause is used in collaboration with the SELECT statement to arrange data with identical values into groups.",
    "ORDER BY":"SELECT column1, column2, ... \nFROM table_name ORDER BY column1, column2, ... \nASC|DESC;\n\nSELECT f_name, l_name, dep_id FROM employees ORDER BY dep_id DESC, l_name;\n\nThis displays the ﬁrst name, last name, and department ID of employees, ﬁrst sorted in descending order of department IDs and then sorted alphabetically as per their last names.\n\nORDER BY keyword is used to sort the result-set in ascending or descending order. The default is ascending. In case of multiple columns in ORDER BY, the sorting will be done in the sequence of the appearance of the arguments.",
    "between":"SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2;\n\nSELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2;\nThis generates all records of employees with salaries between 40000 and 80000.\n\nThe BETWEEN operator selects values within a given range. The values can be numbers, text, or dates. The BETWEEN operator is inclusive: begin and end values are included.",
    "like":"SELECT column1, column2, ... \nFROM table_name WHERE columnN LIKE pattern;\n\nSELECT f_name , l_name FROM employees WHERE address LIKE '%Elgin,IL%';\n\n LIKE operator is used in a WHERE clause to search for a speciﬁed pattern in a column.\n\n ",
    "connect":"Create a new database and open a database connection to allow sqlite3 to work with it. Call sqlite3.connect() to create a connection to the database INSTRUCTOR.db in the current working directory, implicitly creating it if it does not exist.\n\nsqlite3.connect()\n\ncon = sqlite3.connect('INSTRUCTOR.db')",
    "cursor":"To execute SQL statements and fetch results from SQL queries, use a database cursor. Call con.cursor() to create the Cursor.\n\ncon.cursor()\n\ncursor_obj = con.cursor()",
    "execute":"The execute method in Python's SQLite library allows to perform SQL commands, including retrieving data from a table using a query like 'Select * from table_name.' When you execute this command, the result is obtained as a collection of table data stored in an object, typically in the form of a list of lists.\n\nThe execute method in Python's SQLite library allows to perform SQL commands, including retrieving data from a table using a query like 'Select * from table_name.' When you execute this command, the result is obtained as a collection of table data stored in an object, typically in the form of a list of lists.",
    "fetchall":"The fetchall() method in Python retrieves all the rows from the result set of a query and presents them as a list of tuples.\n\nUsage:\n statement = '''SELECT * FROM INSTRUCTOR'''\ncursor_obj.execute(statement)\noutput_all = cursor_obj.fetchall()\nfor row_all in output_all:\n    print(row_all)\n\nThe fetchall() method in Python retrieves all the rows from the result set of a query and presents them as a list of tuples.",
    "fetchmany":"fetchmany()\n\n output_many = cursor_obj.fetchmany(2)\noutput_many = cursor_obj.fetchmany(2)\n    output_many = cursor_obj.fetchmany(2)",
    "read_sql_query":"read_sql_query()\n\n df = pd.read_sql_query('select * from instructor;', conn)",
    "create": "CREATE TABLE table_name (\n    column1 datatype PRIMARY KEY (one or more columns),\n    column2 datatype,\n    column3 datatype,\n    ...\n);",
    "count": "COUNT is a function that takes the name of a column as argument and counts the number of rows when the column is not NULL.\n\nSELECT COUNT * FROM table_name ;\n usage: \n SELECT COUNT(country) FROM placeofinterest WHERE country='Canada';",
    "insert": "INSERT is used to insert new rows in the table.\n\nINSERT INTO table_name (column1, column2, column3, ...)\nVALUES (value1, value2, value3, ...);",
    "select": "SELECT statement is used to fetch data from a database.\n\nSELECT column1, column2, column3, ...\nFROM table_name\nWHERE condition; \n usage:\n SELECT city FROM placeofintereste;",
    "where": "WHERE clause is used to extract only those records that fulﬁll a speciﬁed condition.\n\nSELECT column1, column2, column3, ...\nFROM table_name\nWHERE condition; \n usage:\n SELECT city FROM placeofintereste;",
    "update": "UPDATE used to update the rows in the table.\n\nUPDATE table_name\nSET column1 = value1, column2 = value2, ...\nWHERE condition;\n\nUPDATE used to update the rows in the table.",
    "delete": "DELETE statement is used to remove rows from the table which are speciﬁed in the WHERE condition.\n\nDELETE FROM table_name\nWHERE condition;\n\nDELETE statement is used to remove rows from the table which are speciﬁed in the WHERE condition.",
    "drop": "DROP TABLE table_name;\n\nUse the DROP TABLE statement to delete a table from a database. If you delete a table that contains data, by default the data will be deleted alongside the table.",
    "alter_table_add_column": "ALTER TABLE table_name\nADD column_name datatype;",
    "alter_table_rename": "ALTER TABLE table_name\nRENAME TO new_table_name;",
    "create_index": "CREATE INDEX index_name\nON table_name (column1, column2, ...);",
    "create_unique_index": "CREATE UNIQUE INDEX index_name\nON table_name (column1, column2, ...);",
    "drop_index": "DROP INDEX index_name;",
    "create_view": "CREATE VIEW view_name AS\nSELECT column1, column2, ...\nFROM table_name\nWHERE condition;",
    "drop_view": "DROP VIEW view_name;",
    "pragma": "PRAGMA pragma_name;",
    "transaction_begin": "BEGIN TRANSACTION;",
    "transaction_commit": "COMMIT;",
    "transaction_rollback": "ROLLBACK;",
    "attach_database": "ATTACH DATABASE 'file_path' AS database_name;",
    "detach_database": "DETACH DATABASE database_name;",
    "analyze": "ANALYZE table_name;",
    "vacuum": "VACUUM;",
    "create_trigger": "CREATE TRIGGER trigger_name\nBEFORE INSERT ON table_name\nFOR EACH ROW\nBEGIN\n    -- SQL statements\nEND;",
    "drop_trigger": "DROP TRIGGER trigger_name;",
    "limit":"LIMIT is a clause to specify the maximum number of rows the result set must have.\n\nSELECT * FROM table_name LIMIT number;\n\nSELECT * FROM placeofinterest WHERE airport='pearson' LIMIT 5;"
}