1. IF CONDITION SELECT IF(condition,true,false) AS row_name; 2. ADD 10 DAYS IN DATE SELECT DATE_ADD("2019-10-01", INTERVAL 10 DAY) 3. SUBTRACT 10 DAYS FROM DATE SELECT DATE_SUB("2019-10-01", INTERVAL 10 DAY); 4. FORMAT DATE DATE_FORMAT(table.date, "%Y-%m-%d 23:59:59") PRACTICAL EXAMPLE IN A SELECT-INSERT QUERY : INSERT INTO subscription_history( customer_id, sales_log_id, customer_name, plan_id, plan_name, plan_duration, transaction_price, subscription_plan_purchased_date, subscription_activation_date, subscription_end_date, status, created_by, updated_by, deleted_by, deleted_at, created_at, updated_at) SELECT sales_log.customer_id, sales_log.id AS sales_log_id, customers.name AS customer_name, sales_log.plan_id, subscription_plans.plan_name, subscription_plans.plan_duration, subscription_plans.plan_price AS transaction_price, sales_log.sales_date AS subscription_plan_purchased_date, sales_log.sales_date AS subscription_acti...