Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

SQL-in-JS formatting 😍 This is possible thanks to prettier-plugin-embed by Sec-ant (Ze-Zheng Wu), prettier-plugin-sql by JounQin, sql-formatter by Rene Saarsoo Setup Guide:

45,064 Aufrufe • vor 2 Jahren •via X (Twitter)

6 Kommentare

Profilbild von Karl Horky 🦋 @karlhorky.com
Karl Horky 🦋 @karlhorky.comvor 2 Jahren

Give these projects a star 🌟 prettier-plugin-embed by Sec-ant (Ze-Zheng Wu)

Profilbild von Karl Horky 🦋 @karlhorky.com
Karl Horky 🦋 @karlhorky.comvor 2 Jahren

prettier-plugin-sql by @JounQin

Profilbild von Karl Horky 🦋 @karlhorky.com
Karl Horky 🦋 @karlhorky.comvor 2 Jahren

sql-formatter by @renku

Profilbild von Karl Horky 🦋 @karlhorky.com
Karl Horky 🦋 @karlhorky.comvor 2 Jahren

More great SQL tooling here:

Profilbild von Anton Revyako
Anton Revyakovor 2 Jahren

@JounQin @renku Why are you storing sql in js? Put it in a separate file, it will bring many benefits

Profilbild von Karl Horky 🦋 @karlhorky.com
Karl Horky 🦋 @karlhorky.comvor 2 Jahren

@JounQin @renku SQL-in-JS allows you to integrate with JavaScript and TypeScript: 1. Interpolation of runtime JavaScript values (eg. function parameters) 2. SQL closer to your logic (colocation) 3. Checking against TypeScript types Etc. Lots of benefits of having it in your JS/TS

Ähnliche Videos

Dear Friend, I wrote this book for you. For the past year, I have labored to create a product that will help you learn and master SQL. I have been there. I have felt the frustration of trying to learn SQL and not knowing where to begin. I have lived through the struggle of setting up a platform to run SQL queries. Most platforms require sign-ups and logins that create a headache for learners. I also know the challenge of finding proper SQL exercises that mirror the real-world experience of a data analyst. Yes, I have been in your shoes. That’s why I created SQL Essentials for Data Analysis: A 50-Day Hands-on Challenge Book (Go From Beginner to Pro). Yes, to give you a clear, practical path from beginner to confident SQL user. ✅Why SQL Still Matters You may be wondering if SQL still matters in 2025. The answer: it has never mattered more. SQL is the lingua franca of data. Data still lives in databases, and the only language it truly understands is SQL. Think about it, even in Python, SQL is there. You’ve probably heard about the powerful pandas library. Guess what? It also has some SQL. And don’t get me started on BigQuery, Tableau, Power BI, and Databricks; the answer is the same: they all rely on SQL. SQL is the big shadow that hovers over everything data. This is why learning SQL is a must for data analysts, engineers, scientists, and anyone working with data. SQL connects everything: exploration, extraction, transformation, modeling, validation, and reporting. ✅Why I Wrote This Book Dear friend, I wanted to create a resource that gives you everything you need to learn SQL for data analysis. Quite often, resources are scattered across different places. You might learn theory in one place, search for datasets in another, and hunt for questions somewhere else. More often than not, the only place you can tackle SQL challenges is online. But online platforms usually focus on syntax and don’t reflect the messiness of real-world data. I wrote this book to give you the best of both worlds: theory and practice. I don’t want you to be worrying about where to find resources. I want you to focus only on learning SQL. If you are new to SQL or need a refresher on the fundamentals, Part 1 of the book has you covered. If you are looking for practice, Part 2 is 49 days of hands-on SQL challenges designed to mirror real-world tasks. Each day in the book is designed to feel like a mini project, rather than isolated exercises. Take Day 15: Standardize Climbers Data, for example: On this day, you’re not just writing a single query; you’re working with a dataset from start to finish. By combining these tasks, you experience a full data preprocessing workflow, just like a real project. You get to practice loading, transforming, cleaning, and validating data, all in one challenge. This approach makes every day a hands-on project, not just an isolated query. You’re learning how SQL is used in real-world scenarios, not just memorizing syntax. By the end of each day, you’ve solved a problem that feels meaningful and practical: yes, something that mirrors data analysts’ and engineers’ work in real life. In this book I use SQLite. I chose SQLite because it’s simple, lightweight, and runs on any system without complicated setups or cloud accounts. You don’t need to worry about complex configurations. SQLite allows you to focus entirely on learning SQL concepts, queries, and logic without distractions. You will just have to import it. I also structured the book for use in Jupyter or Google Colab notebooks. These are playgrounds for data analysts, engineers, and scientists. These environments are interactive and flexible. They let you run queries, visualize results, and experiment in real time. Using notebooks ensures that you can practice SQL while documenting your work and learning at your own pace, all in one place. No need for sign-ups. ✅Why 50 Days? I chose 50 days intentionally. Learning SQL isn’t a sprint; it’s a habit. You can’t truly master a language by cramming a few queries in one sitting. 50 days creates a commitment. You attach yourself to a goal, a tangible outcome. Every day is a small win, a step forward, and by the end of the journey, you’ve transformed your understanding of SQL. By spreading the learning over 50 days, you build momentum, consistency, and confidence. Think of it like training for a marathon. You don’t run 26 miles on the first day. You run a little each day, gradually building strength, endurance, and skill. By the end of the 50 days, you’ll have tackled a wide range of SQL tasks: from simple filtering to window functions, date operations, joins, and performance tuning. You’ll have not just learned SQL but truly internalized it. The goal isn’t to overwhelm you. It’s to give you a structured, achievable path that fits into your daily routine, so learning SQL becomes natural, steady, and rewarding. Even if you don’t finish within 50 days, the 50-day structure gives you a rhythm, a habit, and a sense of accomplishment. The kind of outcome that sticks long after the book is finished. In summary, I wrote the book to address these pain points: 🔶Not knowing where to start: The book gives you a clear roadmap that guides you day by day. 🔶Too much theory, not enough practice: Reading about SQL is not the same as doing SQL. This book includes hands-on challenges that mirror real-world scenarios, so you’re not just memorizing commands; you’re learning to think like a data analyst. 🔶Complex setup: Many learners get stuck setting up databases or configuring environments. You will not worry about complex setups; everything runs in SQLite3 inside Jupyter Notebook, so you start immediately. 🔶Disconnected learning: The challenges mirror real-world analytics problems. Every day here is like a mini project, giving you the experience of exploring, cleaning, transforming, and analyzing data ✅What I ask of You I wrote this book for you because I want you to succeed, but books alone don’t create mastery; your effort does. I have provided the tools. All I ask is that you show up every day. Even if it’s just 20–30 minutes, take the challenge seriously. Tackle the problems, experiment with your queries, make mistakes, and fix them. That’s how real learning happens. I also ask that you trust the process. The book is designed to guide you from beginner to confident SQL user, step by step. Some days will feel "easy" and others "hard." Stay the course, and by the end, you’ll see how all the pieces fit together. Finally, I ask that you bring curiosity and persistence. SQL is a language of logic and structure, but it’s also a language of insight. The more you explore, the more patterns you’ll discover, and the more confident you’ll become in solving real-world problems. Don’t be scared to experiment. If you commit to this, I promise you’ll finish 50 days with more than just knowledge. You’ll have the skills, confidence, and habit of thinking like a data analyst. To make starting even easier, as a subscriber to this newsletter, I’m giving you an exclusive 35% launch discount. You can grab your copy today and start the 50-day journey at a reduced price. Grab SQL Essentials for Data Analysis here: I can’t wait to hear about your progress, the insights you uncover, and the confidence you gain along the way. If you have any questions, feel free to reach out to me or post them in the comments section. Let’s start this journey together: one challenge, one query, one day at a time. Warmly, Benjamin PS. Please repost.

Benjamin Bennett Alexander

16,646 Aufrufe • vor 8 Monaten

GeoLibre v1.9.0 is here! GeoLibre is a free and open-source, lightweight, cloud-native GIS platform for visualizing, exploring, and analyzing geospatial data. It runs everywhere you do, in the web browser, on the desktop, on mobile, and inside Jupyter notebooks, all while keeping your data local and private. This release brings CAD drawing import, smarter WMS and WFS service discovery, and a docked SQL workspace with autocomplete. What's new in v1.9.0 - CAD import: Add CAD drawings (DXF/DWG) as a layer, with a picker for choosing which drawing layers to load and a CRS selector for placing them correctly on the map. - Smarter service discovery: WMS and WFS panels now read the service's GetCapabilities, so you pick available layers and feature types from a populated dropdown instead of typing names by hand. - Docked SQL Workspace: The SQL Workspace now docks as a resizable panel beside the map, with editor autocomplete for tables, columns, and SQL keywords. - Generic Vector to Vector conversion: Convert between any supported vector formats by file extension, alongside the existing targeted converters. - Richer camera tours: Per-keyframe hold and transition duration controls for finer pacing, plus save and reload of a named tour setup. - Better story maps: A hide-itinerary toggle, subtitle and byline fields on the printable handout, and dedicated start and closing slides. - Styling and plugin extras: A transparent (no fill / no outline) option in the color picker, a Legend populated from a paletted raster's color table, and plugins can now use the maplibre-gl-raster stack and the projection control. Try it out - Launch GeoLibre web: - GitHub: - Documentation: - Release notes: #GIS #Geospatial #OpenSource #RemoteSensing #DataVisualization #MapLibre #Python

Qiusheng Wu

19,457 Aufrufe • vor 19 Tagen

Your agents can't keep up with real-time data. Especially when it's scattered across dozens of sources. Most teams waste weeks building custom connectors for every database, API, and data warehouse. Then they build ETL pipelines to sync everything. By the time your agent retrieves the data, it's already outdated. Picture this: Your Postgres database updated 5 minutes ago. Your MongoDB collection changed 2 minutes ago. Your agent is still pulling from yesterday's snapshot. This is why most production RAG systems fail. There's a better approach: MindsDB is an open-source AI platform with a federated data engine that lets you query multiple data sources in real-time using SQL - without moving any data. Here's what makes it different: ↳ Your data stays in place. No ETL pipelines or data duplication ↳ Query Postgres, MongoDB, REST APIs, and more using consistent SQL ↳ JOIN across different sources in real-time with a unified interface ↳ Works with both structured and un-structured data And here's the best part: You don't even need to write SQL. Just describe what you want in plain English, and MindsDB converts it to SQL automatically. The system does all the heavy lifting. The breakthrough for AI agents is simple: When data updates at the source, your agent gets fresh results immediately. No sync delays. No stale embeddings. No custom code for each integration. You can literally write a SQL query that joins a Postgres table with a MongoDB collection and gets live results. This is what production AI applications need but rarely get. In this video, I give you a complete walkthrough of what we just discussed and how to actually do it. Make sure you watch this till the end. I've shared the link to MindsDB's GitHub repo in the next tweet!

Akshay 🚀

65,672 Aufrufe • vor 8 Monaten

SQL has levels to it: - level 1 SELECT, FROM, WHERE, GROUP BY, HAVING, LIMIT Master these basic keywords and you’ll be well on your way to mastering SQL. - level 2 Mastering JOINs: Most common JOINs: INNER and LEFT Less common JOINs: FULL OUTER Joins you should avoid almost always: RIGHT and CROSS JOIN Mastering common table expressions (CTEs). The WITH keyword defines a CTE which you can imagine as a “variable” that you can query later. Using variables like this you can master algorithm techniques like recursion, breadth first search and more! CTEs also make your SQL much more readable and make your coworkers hate you less compared to nested sub queries. - level 3 Mastering window functions Window functions have 3 pieces: The function (i.e. SUM, RANK, AVG) The over clause to start the window The window definition which has 3 pieces: - how to split the window up with PARTITION BY - how to order the window with ORDER BY - how to restrict the window size with ROWS clause (useful for rolling monthly averages) Understand RANK vs DENSE_RANK vs ROW_NUMBER, I have been asked this in interviews a million times. - level 4 You understand table scans, b-tree indexes, and partitioning schemes to increase performance. Doing something like COUNT(CASE WHEN) is much better than doing multiple queries with a UNION ALL. UNION ALL is terrible for all sorts of reasons that I don’t want to get into in this post. B-trees indexes allow for efficient scanning of data in the WHERE clause. Use explain plans to understand if an index is actually being used or not! Partitioning is similar to indexes except it’s a “poor mans” index. It just keeps data in specific folders and skips the folders that don’t include the data I question. What else did I miss for mastering SQL?

Zach Wilson

79,538 Aufrufe • vor 1 Jahr

Mesa County, Colorado Dominion System Was WIDE OPEN, any computer in the WORLD could connect to the EMS server and flip votes with a few clicks in the 2020 Election. 36 wireless devices, global SQL access via port 1433, uncertified software, and live vote manipulation DEMONSTRATED. Certification was illegal. System should have been decertified immediately. This is the 2nd forensic report to Mesa County, Colorado, connected to Tina Peters. The most significant findings allowed unrestricted global SQL access. The EMS server was configured so any computer in the world could connect directly to the SQL databases via port 1433, default SQL port. Windows Firewall allowed inbound connections from any IP address with no restrictions. All SQL protocols were enabled. Shared Memory, Named Pipes, and TCP/IP, making remote access trivial. 36 wireless devices identified built into the DVS D-Suite system, 35 in voting components like Dell Latitude/Optiplex ICVA/ICC machines and ICX tablets + 1 Dell E3DW wireless printer on the EMS server. These were vulnerable to known attacks (KRACK). Self-signed certificate used for encryption, vulnerable to man-in-the-middle attacks. Shared/default passwords for administrative accounts, violating user accountability requirements. Audit logs overwritten/deleted by design and configuration, building on Report #1 findings. Uncertified software, Microsoft SQL Server Management Studio (SSMS) was installed on the server, May 7, 2017, but not listed in the official certification application or test report for DVS D-Suite 5.1-CO. Live vote manipulation was demonstrated using SSMS, changing just two values in the dbo.Choice table, internalMachineId for candidates, flipped vote totals between candidates, one example altered tens of thousands of votes in the demo. Multiple election databases, including 2020 General, municipal, etc., were fully accessible and modifiable. Anyone at a logged-in EMS server could alter databases in seconds with SSMS. From any non-Dominion computer on the same subnet. From a cell phone/iPhone connected to the network using a free SQL app, successfully identified the server and modified data. These are HUGE security risks of enormous proportions, compromising the 2020 Election in multiple ways with multiple attack vectors.

The SCIF

46,836 Aufrufe • vor 18 Tagen

SQL has levels to it: - level 1 SELECT, FROM, WHERE, GROUP BY, HAVING, LIMIT Master these basic keywords and you’ll be well on your way to mastering SQL. - level 2 Mastering JOINs: Most common JOINs: INNER and LEFT Less common JOINs: FULL OUTER Joins you should avoid almost always: RIGHT and CROSS JOIN Mastering common table expressions (CTEs). The WITH keyword defines a CTE which you can imagine as a “variable” that you can query later. Using variables like this you can master algorithm techniques like recursion, breadth first search and more! CTEs also make your SQL much more readable and make your coworkers hate you less compared to nested sub queries. - level 3 Mastering window functions Window functions have 3 pieces: The function (i.e. SUM, RANK, AVG) The over clause to start the window The window definition which has 3 pieces: - how to split the window up with PARTITION BY - how to order the window with ORDER BY - how to restrict the window size with ROWS clause (useful for rolling monthly averages) Understand RANK vs DENSE_RANK vs ROW_NUMBER, I have been asked this in interviews a million times. - level 4 You understand table scans, b-tree indexes, and partitioning schemes to increase performance. Doing something like COUNT(CASE WHEN) is much better than doing multiple queries with a UNION ALL. UNION ALL is terrible for all sorts of reasons that I don’t want to get into in this post. B-trees indexes allow for efficient scanning of data in the WHERE clause. Use explain plans to understand if an index is actually being used or not! Partitioning is similar to indexes except it’s a “poor mans” index. It just keeps data in specific folders and skips the folders that don’t include the data I question. What else did I miss for mastering SQL?

Zach Wilson

34,010 Aufrufe • vor 2 Monaten