Showing posts with the label Disk space

Featured Post

SQL Query: 3 Methods for Calculating Cumulative SUM

SQL provides various constructs for calculating cumulative sums, offering flexibility and efficiency in data analysis. In this article, we explore three distinct SQL queries that facilitate the computation of cumulative sums. Each query leverages different SQL constructs to achieve the desired outcome, catering to diverse analytical needs and preferences. Using Window Functions (e.g., PostgreSQL, SQL Server, Oracle) SELECT id, value, SUM(value) OVER (ORDER BY id) AS cumulative_sum  FROM your_table; This query uses the SUM() window function with the OVER clause to calculate the cumulative sum of the value column ordered by the id column. Using Subqueries (e.g., MySQL, SQLite): SELECT, t1.value, SUM(t2.value) AS cumulative_sum FROM your_table t1 JOIN your_table t2 ON >= GROUP BY, t1.value ORDER BY; This query uses a self-join to calculate the cumulative sum. It joins the table with itself, matching rows where the id in the first table is greater than or

10 Top Unix Disk Space Quiz Questions

I have listed 10 top Quiz questions on UNIX disk space. These questions help you to understand about disk-related concepts quickly. Unix Disk Space QUIZ Questions. Below listed 10 quiz questions help you to know the disk-space related concepts. 1. All devices are considered as files in Unix. Yes 2. All device files are stored in /etc or in its subdirectories. No 3. CD-ROM is a character device. No 4. The printer is a character device. Yes 5. The minor number represents the type of device. No 6. The dd command is used for copying data from one medium to another. Yes 7. The term bs in the dd command stands for block size. Yes 8. The du utility displays complete information about the usage of disk space by each file and directory. Yes 9. By default, the du command displays information in terms of 1024-byte blocks. No 10. The df command reports only the free disk space of the file system installed on our machines. Yes Keep Reading Top vi Editor Commands for Ubuntu