Virtual Private CloudIntroduction In a Virtual Private Cloud (VPC), the concept of "virtual private" implies that the resources within the VPC are logically isolated from resources in other VPCs and are dedicated to a specific customer or organization. This means that, w...Dec 21, 2023·5 min read
Curious Case Of Using Extract to find the MinutesUsing Extract in timestamp vs in an interval When extracting minutes from a timestamp and extracting minutes from an interval, the primary difference lies in the source data and the purpose of the extraction. Extracting Minutes from Timestamp: When...Nov 27, 2023·2 min read
Concatenation In SqlIntroduction In SQL, you can concatenate two strings from two columns using the CONCAT function or the + operator, depending on the database system you are using. Using CONCAT Function: SELECT CONCAT(column1, ' ', column2) AS concatenated_string ...Nov 11, 2023·1 min read
Interval Operator in SQLIntroduction The "interval" operator in SQL is typically used to perform operations involving date and time intervals. SQL databases that support date and time data types often provide the INTERVAL keyword for constructing intervals and performing ...Oct 16, 2023·2 min read
Curious Case of ``` Case``` StatementIntroduction In order to use non-aggregated columns in the group-by clause we need to mention them compulsorily in the group-by clause. For a strict database like PostgreSQL, we will get an error. A case statement can be used along with group by c...Sep 18, 2023·1 min read
Type Casting in SQL datetime to dateIntroduction When you typecast a datetime column to a date in a database or programming language, it typically does not change the original data everywhere automatically. Instead, it creates a new representation of the data where the time component...Sep 14, 2023·2 min read
Mathematical Calculation Using Window FunctionsCumulative Average The window frame determines the range of rows that contribute to the window function's calculation. In this case, we'll use the ROWS BETWEEN clause to specify the frame. Suppose you have a table named sales with columns sale_date...Aug 8, 2023·4 min read