Granting and revoking access to a view GRANT privilege(s) or REVOKE privilege(s) ON object TO role or FROM role Privileges: SELECT, INSERT, UPDATE, DELETE, etc. Obe...
In a database, a view is the result set of a stored query on the data, which the database users can query just as they would in a persistent database collection object. Virtual table that is n...
Star and Snowflake Schema Star Schema Dimensional modeling: star schema Fact tables Holds records of a metric Changes regularly Connects to dimensions via forei...
How should we organize and manage data? Schemas: How should my data be logically organized? Normalization: Should my data have minimal dependency and redundancy? View...
COUNT() Returns the number of items found in a group. COUNT([ALL] expression) COUNT(DISTINCT expression) COUNT(*) Example: SELECT ...
Position Functions LEN() CHARINDEX() PATINDEX() LEN() Returns the number of characters of the provided string. Syntax: LEN...
Common mistakes when working with dates and time Inconsistent date time formats or patterns Arithmetic Operations Issues with time zones Time Zones in...
Categories of Data Types Exact numerics Approximate numerics Date and Time Character Strings Unicode Character Strings Binary Strings Other da...
Using Aggregation Functions Over Windows Ranking Functions ROW_NUMBER(): Unique, ascending integer value starting from 1. RANK(): Ascending integer value starting from 1. ...
Key Aggregation Functions Counts COUNT() COUNT_BIG() COUNT(DISTINCT) Other Aggregates SUM() ...