ROLLUP and CUBE in SELECT Statement

SQL provides powerful extensions to GROUP BY: ROLLUP and CUBE. These are extremely useful for building reports with subtotals and cross-tab summaries. Let’s see some practical examples. Example 1: Total Salaries with ROLLUP by Department and Job This query calculates total salaries: Output: The hierarchy is clear: job totals roll up into department totals, which […]

Sample OCI CLI Commands

Troubleshooting with OCI CLI: Practical Examples 1. Checking Database System Status When users complain about slow connections or failures, the first step is to verify if the DB system is healthy. Sample Output Interpretation: 2. Checking Database Instance Health Sample Output Interpretation: 3. Checking Recent Database Backups When a backup job fails, confirm the backup […]