Last active
November 3, 2021 06:25
-
-
Save Luke-SNAW/b700050f18e8e10fdb6bdc25234e8226 to your computer and use it in GitHub Desktop.
[DB__SQL] #articles
- RxDB: A realtime Database for JavaScript Applications
- Data Mapper vs. Active Record
- Top 11 Node.js ORMs, Query Builders & Database Libraries in 2021
- https://typeorm.io/#/active-record-data-mapper/what-is-the-active-record-pattern
- https://www.reddit.com/r/node/comments/j8i3ku/sequelize_vs_typeorm_vs_objection_for_nodejs/
- 6 SQL Queries Every Data Engineer Should Be Aware of
- Running Totals
SELECT id,month , Amount , SUM(Amount) OVER (ORDER BY id) as total_sum FROM bill
- Common Table Expressions
->
SELECT * FROM bill WHERE id in (SELECT DISTINCT id FROM id WHERE country = "US" AND status = "Y" )
WITH idtempp as ( SELECT id as id FROM id WHERE country = "US" AND status = "Y" ) SELECT * FROM bill WHERE id in (SELECT id from idtempp)
- Temporary Functions
CREATE TEMPORARY FUNCTION get_gender(type varchar) AS ( CASE WHEN type = "M" THEN "male" WHEN type = "F" THEN "female" ELSE "n/a" END ) SELECT name, get_gender(Type) as gender FROM bill
- Running Totals
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment