From 5a487bf6942b5e8a8f8e561b9d29b46f22f108d4 Mon Sep 17 00:00:00 2001 From: Lukas Kulas Date: Fri, 23 Jun 2023 11:36:57 +0800 Subject: [PATCH 1/8] Create asin.md with contents --- .../math-functions/terms/asin/asin.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 content/sql/concepts/math-functions/terms/asin/asin.md diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md new file mode 100644 index 00000000000..e6e704d2cc4 --- /dev/null +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -0,0 +1,54 @@ +--- +Title: 'ASIN()' +Description: 'Returns the arc sine of a number.' +Subjects: + - 'Data Science' + - 'Computer Science' +Tags: + - 'SQLite' + - 'PostgreSQL' + - 'MySQL' + - 'Functions' +CatalogContent: + - 'learn-sql' + - 'paths/analyze-data-with-sql' +--- + +The **`ASIN()`** function in SQL is a mathematical function that returns the sine of an angle. + +## Syntax + +```sql +SELECT ASIN(number); +``` +The specified number must be between -1 to 1, otherwise this function returns NULL. + +## Example + +In this example, the following data is given in the `numbers` table: + +| id | input_number | +| -------------- | ------------ | +| 1 | 0.6 | +| 2 | 1 | +| 3 | -0.9 | + +The `ASIN()` function is used to calculate the arcsine as the output_number: + +```sql +SELECT id, input_number, ASIN(input_number) AS output_number +FROM numbers; +``` + +The output will be: + +| id | input_number | output_number | +| -------------- | ------------- | ------------------ | +| 1 | 0.6 | 0.64350110879328437 | +| 2 | 1 | 1.5707963267948966 | +| 3 | -0.9 | -1.1197695149986342 | + +It works with with SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse + +> **Note:** For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the ASIN() function implementation and compatibility. + From 71942beecfb21ae51cd06715a1f7b20746531ba5 Mon Sep 17 00:00:00 2001 From: arisdelacruz <115809819+arisdelacruz@users.noreply.github.com> Date: Sun, 25 Jun 2023 07:02:27 +0800 Subject: [PATCH 2/8] Update content/sql/concepts/math-functions/terms/asin/asin.md Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> --- content/sql/concepts/math-functions/terms/asin/asin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index e6e704d2cc4..0f48a7af0c5 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -14,7 +14,7 @@ CatalogContent: - 'paths/analyze-data-with-sql' --- -The **`ASIN()`** function in SQL is a mathematical function that returns the sine of an angle. +The **`ASIN()`** function in SQL is a mathematical function that returns the inverse sine of a number. ## Syntax From 7227e5536ddd3cce1e36f2090b6d113a09d50e04 Mon Sep 17 00:00:00 2001 From: arisdelacruz <115809819+arisdelacruz@users.noreply.github.com> Date: Sun, 25 Jun 2023 07:03:01 +0800 Subject: [PATCH 3/8] Update content/sql/concepts/math-functions/terms/asin/asin.md Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> --- content/sql/concepts/math-functions/terms/asin/asin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 0f48a7af0c5..91c050a7227 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -18,8 +18,8 @@ The **`ASIN()`** function in SQL is a mathematical function that returns the in ## Syntax -```sql -SELECT ASIN(number); +```pseudo +ASIN(number) ``` The specified number must be between -1 to 1, otherwise this function returns NULL. From 37427354549c38ce8bed0ffdbebfa3db845a0f6b Mon Sep 17 00:00:00 2001 From: arisdelacruz <115809819+arisdelacruz@users.noreply.github.com> Date: Sun, 25 Jun 2023 07:03:13 +0800 Subject: [PATCH 4/8] Update content/sql/concepts/math-functions/terms/asin/asin.md Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> --- content/sql/concepts/math-functions/terms/asin/asin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 91c050a7227..2acdfbd735b 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -21,7 +21,7 @@ The **`ASIN()`** function in SQL is a mathematical function that returns the in ```pseudo ASIN(number) ``` -The specified number must be between -1 to 1, otherwise this function returns NULL. +The specified number must be between -1 to 1, otherwise this function returns `NULL`. ## Example From 6b6fc919c5e47d0f0abe19ac7307b22bda624549 Mon Sep 17 00:00:00 2001 From: arisdelacruz <115809819+arisdelacruz@users.noreply.github.com> Date: Sun, 25 Jun 2023 07:03:26 +0800 Subject: [PATCH 5/8] Update content/sql/concepts/math-functions/terms/asin/asin.md Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> --- content/sql/concepts/math-functions/terms/asin/asin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 2acdfbd735b..6ae374da155 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -33,7 +33,7 @@ In this example, the following data is given in the `numbers` table: | 2 | 1 | | 3 | -0.9 | -The `ASIN()` function is used to calculate the arcsine as the output_number: +The `ASIN()` function is used to calculate the arcsine as `output_number`: ```sql SELECT id, input_number, ASIN(input_number) AS output_number From 30659fc8a4868e6be3d25abeb3d2f5966b9dded3 Mon Sep 17 00:00:00 2001 From: arisdelacruz <115809819+arisdelacruz@users.noreply.github.com> Date: Sun, 25 Jun 2023 07:03:43 +0800 Subject: [PATCH 6/8] Update content/sql/concepts/math-functions/terms/asin/asin.md Co-authored-by: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> --- content/sql/concepts/math-functions/terms/asin/asin.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 6ae374da155..3bddfe7428c 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -48,7 +48,5 @@ The output will be: | 2 | 1 | 1.5707963267948966 | | 3 | -0.9 | -1.1197695149986342 | -It works with with SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse - > **Note:** For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the ASIN() function implementation and compatibility. From de473d1005f9ef26ac3cb64b91e6c5ab1ba5b1d8 Mon Sep 17 00:00:00 2001 From: SSwiniarski <86081858+SSwiniarski@users.noreply.github.com> Date: Sun, 25 Jun 2023 10:06:46 -0400 Subject: [PATCH 7/8] Update asin.md --- content/sql/concepts/math-functions/terms/asin/asin.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 3bddfe7428c..6484da5dff5 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -14,7 +14,7 @@ CatalogContent: - 'paths/analyze-data-with-sql' --- -The **`ASIN()`** function in SQL is a mathematical function that returns the inverse sine of a number. +The **`ASIN()`** function in SQL is a mathematical function that returns the inverse sine of a number. ## Syntax @@ -49,4 +49,3 @@ The output will be: | 3 | -0.9 | -1.1197695149986342 | > **Note:** For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the ASIN() function implementation and compatibility. - From fb7147da0cdca95ed3e7d7cef0ee7ecd6f62488c Mon Sep 17 00:00:00 2001 From: Caupolican Diaz Date: Tue, 27 Jun 2023 12:57:56 -0700 Subject: [PATCH 8/8] review edits --- .../math-functions/terms/asin/asin.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/content/sql/concepts/math-functions/terms/asin/asin.md b/content/sql/concepts/math-functions/terms/asin/asin.md index 6484da5dff5..545b213391d 100644 --- a/content/sql/concepts/math-functions/terms/asin/asin.md +++ b/content/sql/concepts/math-functions/terms/asin/asin.md @@ -1,6 +1,6 @@ --- Title: 'ASIN()' -Description: 'Returns the arc sine of a number.' +Description: 'Returns the arcsine of a number.' Subjects: - 'Data Science' - 'Computer Science' @@ -14,24 +14,25 @@ CatalogContent: - 'paths/analyze-data-with-sql' --- -The **`ASIN()`** function in SQL is a mathematical function that returns the inverse sine of a number. +The **`ASIN()`** function in SQL is a mathematical function that returns the inverse sine or arcsine of a number. ## Syntax ```pseudo ASIN(number) ``` -The specified number must be between -1 to 1, otherwise this function returns `NULL`. + +The specified `number` must be between -1 and 1, otherwise this function returns `NULL`. ## Example In this example, the following data is given in the `numbers` table: -| id | input_number | -| -------------- | ------------ | -| 1 | 0.6 | -| 2 | 1 | -| 3 | -0.9 | +| id | input_number | +| --- | ------------ | +| 1 | 0.6 | +| 2 | 1 | +| 3 | -0.9 | The `ASIN()` function is used to calculate the arcsine as `output_number`: @@ -42,10 +43,10 @@ FROM numbers; The output will be: -| id | input_number | output_number | -| -------------- | ------------- | ------------------ | -| 1 | 0.6 | 0.64350110879328437 | -| 2 | 1 | 1.5707963267948966 | -| 3 | -0.9 | -1.1197695149986342 | +| id | input_number | output_number | +| --- | ------------ | ------------------- | +| 1 | 0.6 | 0.64350110879328437 | +| 2 | 1 | 1.5707963267948966 | +| 3 | -0.9 | -1.1197695149986342 | -> **Note:** For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the ASIN() function implementation and compatibility. +> **Note:** For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the `ASIN()` function implementation and compatibility.