forked from nalgeon/sqlean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
3,335 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# sqlite3-stats: statistics | ||
|
||
Common statistical functions for SQLite. | ||
Adapted from [extension-functions.c](https://sqlite.org/contrib/) by Liam Healy. | ||
|
||
Provides following functions: | ||
|
||
- `mode` - mode, | ||
- `median` - median (50th percentile), | ||
- `percentile_25` - 25th percentile, | ||
- `percentile_75` - 75th percentile, | ||
- `percentile_90` - 90th percentile, | ||
- `percentile_95` - 95th percentile, | ||
- `percentile_99` - 99th percentile, | ||
- `stddev` or `stddev_samp` - sample standard deviation, | ||
- `stddev_pop` - population standard deviation, | ||
- `variance` or `var_samp` - sample variance, | ||
- `var_pop` - population variance. | ||
|
||
Usage: | ||
|
||
``` | ||
sqlite> .load sqlite3-stats; | ||
sqlite> select median(value) from generate_series(1, 100); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# sqlite3-unicode: Unicode string functions | ||
|
||
This extension implements true UNICODE functionality for SQLite in regards of case-insensitive comparison of unicode data and SQLite. It uses UNICODE mapping tables to provide the following to SQLite: | ||
|
||
- `upper()`, `lower()`, `title()`, `fold()` functions to normalize strings for comparison by case folding. | ||
- `unaccent()` function to normalize strings for comparison by removing accents. | ||
- `LIKE` operator that uses casefolding to provide case-independent matching. | ||
|
||
Has no external dependencies (like libicu). Adapted from [sqlite3_unicode](https://github.com/Zensey/sqlite3_unicode) by Anton Litvinov. | ||
|
||
Before: | ||
|
||
``` | ||
sqlite> select upper('hello'); | ||
HELLO | ||
sqlite> select upper('привет'); | ||
привет | ||
``` | ||
|
||
After: | ||
|
||
``` | ||
sqlite> .load sqlite3-unicode | ||
sqlite> select upper('hello'); | ||
HELLO | ||
sqlite> select upper('привет'); | ||
ПРИВЕТ | ||
``` |
Oops, something went wrong.