Tagged articles
CTE
56 articles · Page 1 of 1
This article explains ten advanced SQL concepts — including CTEs, recursive CTEs, temporary functions, pivoting with CASE WHEN, EXCEPT vs NOT IN, self joins, ranking functions, delta calculations with LAG/LEAD, running totals, and datetime manipulation — with practical code examples for data science interview preparation.
CTEDateTime ManipulationLAG
0 likes · 11 min read

This article covers 10 advanced SQL concepts — CTEs, recursive CTEs, temporary functions, CASE WHEN pivoting, EXCEPT vs NOT IN, self-joins, ranking functions, delta calculations, running totals, and datetime manipulation — with practical code examples for data science interviews.
CTEData Science InterviewsDateTime Manipulation
0 likes · 11 min read

This article explains ten advanced SQL concepts including CTEs, recursive queries, temporary functions, pivoting with CASE WHEN, EXCEPT vs NOT IN, self-joins, ranking functions, delta calculations with LEAD/LAG, running totals, and datetime manipulation, with code examples for data science interview preparation.
CTEDateTime ManipulationPivoting
0 likes · 12 min read

This article details eight common SQL anti-patterns — including OFFSET pagination, implicit type conversion, correlated subqueries in updates, mixed sorting, EXISTS clauses, blocked condition pushdown, late filtering, and unoptimized intermediate results — with execution plans and rewrites that reduce query times from seconds to milliseconds.
CTEMySQLPagination
0 likes · 16 min read

This article presents ten practical MySQL advanced techniques—including EXPLAIN analysis, composite and covering indexes, index condition push‑down, prefix indexes, window functions, CTEs, JSON handling, partition tables, join optimizations, variables, online DDL, and generated columns—each illustrated with real‑world SQL examples and execution‑plan screenshots to boost efficiency in high‑volume, high‑concurrency environments.
Advanced SQLCTEIndex Optimization
0 likes · 16 min read

This article walks through ten high‑level MySQL tricks—including EXPLAIN analysis, advanced indexing, window functions, CTEs, JSON handling, partitioning, join optimizations, user‑defined variables, online DDL, and generated columns—showing concrete examples, performance trade‑offs, and step‑by‑step guidance for turning slow queries into lightning‑fast operations.
CTEIndexingMySQL
0 likes · 15 min read

This article presents a comprehensive guide to advanced MySQL techniques, covering CTEs, window functions, and query optimization strategies, complete with step‑by‑step code examples, performance tips, and practical demonstrations such as ranking employees and creating materialized views.
CTEMySQLQuery Performance
0 likes · 9 min read

This article presents ten advanced SQL concepts—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, cumulative sums, and date‑time manipulation—each explained with concrete examples and code snippets.
CTEData PivotRanking Functions
0 likes · 11 min read

This article presents ten powerful SQL techniques—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking functions, delta calculations, cumulative sums, and datetime manipulation—complete with explanations and runnable code examples for data analysts and engineers.
CTEWindow Functionsdata analysis
0 likes · 13 min read

Discover ten powerful MySQL features—including CTEs, window functions, conditional aggregation, JSON handling, generated columns, and UPSERT tricks—illustrated with real‑world examples and performance tips, so you can write SQL that is more efficient, maintainable, and production‑ready.
CTEGenerated ColumnsJSON
0 likes · 15 min read

This article presents ten practical MySQL interview questions covering consecutive‑login detection, efficient pagination, top‑salary per department, customers without orders, cumulative sales, recursive cycle detection, pivoting rows to columns, duplicate removal, and user retention, each with complete SQL statements, underlying principles, and performance considerations.
CTEInterview questionsMySQL
0 likes · 11 min read

This article presents ten practical MySQL techniques—from using JSON columns for flexible data to leveraging CTEs, window functions, and advanced clauses like WITH ROLLUP and INSERT IGNORE—each illustrated with real‑world scenarios and ready‑to‑run SQL code to improve query efficiency and developer productivity.
CTEDatabase QueriesJSON
0 likes · 11 min read

This article outlines ten crucial intermediate‑to‑advanced SQL techniques—including common table expressions, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, cumulative sums, and date‑time manipulation—providing explanations and practical query examples for data professionals.
CTEWindow Functionsdatabase
0 likes · 11 min read

This article provides a comprehensive guide to essential SQL concepts for backend developers and data engineers, covering query execution order, core commands, various join types, common table expressions (including recursive CTEs), window functions, and performance optimization techniques such as table scans and indexing, complete with practical code examples and visual illustrations.
CTEJoinsSQL
0 likes · 10 min read

This article explains why the Chengwu low-code platform selected MySQL 8 as its primary database, detailing MySQL 8's advantages over MySQL 5 and Elasticsearch, and describes their dynamic table mechanism that combines relational structure with NoSQL flexibility for multi-tenant enterprise applications.
ACID transactionsCTEElasticsearch
0 likes · 16 min read

This article presents ten essential advanced SQL techniques—including EXPLAIN, window functions, CTEs, bulk operations, index optimization, transactions, JSON handling, temporary tables, proper NULL handling, and recursive queries—to help developers write more efficient, maintainable, and powerful database code.
Advanced QueriesCTESQL
0 likes · 8 min read

This article presents a MySQL interview case that examines e‑commerce repurchase behavior using orders and users tables, defines repeat purchasers, computes average repurchase intervals and amounts, identifies high‑value customers, and aggregates results by city through CTEs, window functions, and grouped statistics.
CTECity-Level MetricsE-commerce Analytics
0 likes · 8 min read

The article shows how to use MySQL CTEs and window functions to identify e‑commerce users who spent over 10,000 CNY in 2023, calculate their average spend and order count, determine their share of all users, and break the results down by city.
CTEInterviewMySQL
0 likes · 5 min read

This article presents an e‑commerce interview case that defines three tables (orders, order_items, products), loads sample data, and walks through a step‑by‑step SQL solution using CTEs, aggregation, window functions and HAVING to calculate each customer's total spend, most expensive order, and favorite product category, filtering and sorting the results.
CTEInterviewMySQL
0 likes · 9 min read

This article explains common MySQL performance pitfalls such as large‑offset LIMIT queries, implicit type conversion, sub‑query updates, mixed sorting, inefficient EXISTS clauses, predicate push‑down limitations, and demonstrates how rewriting with proper indexes, JOINs, early range reduction, and WITH (CTE) statements can reduce execution time from seconds to milliseconds.
CTEMySQLPredicate Pushdown
0 likes · 12 min read

This guide walks through ten essential advanced SQL concepts—including CTEs, recursive queries, temporary functions, CASE‑based pivoting, EXCEPT vs NOT IN, self‑joins, ranking functions, delta calculations, cumulative totals, and date‑time manipulation—providing clear explanations and runnable examples to help data‑science professionals ace interview challenges.
Advanced QueriesCTESQL
0 likes · 11 min read

This guide walks through ten essential advanced SQL techniques—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking functions, delta calculations with LAG/LEAD, cumulative sums, and date‑time manipulation—to help data professionals ace interview challenges and write cleaner, more powerful queries.
Advanced SQLCTESQL
0 likes · 11 min read

This article presents ten crucial intermediate‑to‑advanced SQL concepts—including CTEs, recursive queries, temporary functions, CASE pivots, EXCEPT vs NOT IN, self‑joins, ranking functions, delta calculations, cumulative totals, and date‑time manipulation—each explained with clear examples and code snippets.
CTEData PivotRanking
0 likes · 11 min read

This article presents ten essential advanced MySQL concepts—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, running totals, and date‑time manipulation—each explained with clear examples and practical SQL snippets.
CASE WHENCTEDATETIME
0 likes · 11 min read

This article explains common MySQL performance pitfalls such as large‑offset pagination, implicit type conversion, inefficient UPDATE/DELETE joins, mixed ordering, EXISTS subqueries, predicate push‑down, early data reduction, and intermediate result set push‑down, and provides concrete rewrites that turn multi‑second queries into millisecond‑level executions.
CTEIndexingJoins
0 likes · 13 min read

This article explains ten advanced SQL techniques—including common table expressions, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking functions, delta calculations, cumulative sums, and date‑time manipulation—providing clear explanations and complete query examples to help readers ace data‑science interview questions.
CTEData Science InterviewsSQL
0 likes · 14 min read

This article explains MySQL recursive queries using WITH RECURSIVE, detailing their structure, execution process, common use cases, and provides a step‑by‑step example with table creation, data insertion, and a paginated hierarchical query.
CTEPaginationSQL
0 likes · 9 min read

This article examines the inherent difficulties of SQL when handling multi‑step, ordered, and object‑referencing queries, illustrates them with practical examples, and introduces the Structured Process Language (SPL) as a more expressive alternative for data processing tasks.
CTESPLSQL
0 likes · 16 min read

This article presents nine practical MySQL optimization methods—including smarter LIMIT usage, avoiding implicit type conversion, rewriting subqueries as joins, handling mixed sorting, replacing EXISTS with joins, pushing conditions into subqueries, early range reduction, and using CTEs—to dramatically improve query execution time across common scenarios.
CTEDatabase IndexesLIMIT
0 likes · 14 min read

This article presents a series of practical MySQL performance‑tuning methods—including smarter LIMIT usage, handling implicit type conversion, rewriting UPDATE/DELETE with JOIN, mixed‑order optimization, EXISTS replacement, condition push‑down, early result filtering, and CTE usage—to dramatically reduce query execution time across common scenarios.
CTELIMITMySQL
0 likes · 13 min read

This guide walks you through ten essential advanced SQL techniques—including CTEs, recursive queries, temporary functions, CASE pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, running totals, and date‑time manipulation—providing clear explanations and practical code examples to boost your interview performance.
Advanced QueriesCTEData Science Interviews
0 likes · 12 min read


21CTOJul 27, 2022 · Databases
This article presents ten crucial intermediate‑to‑advanced SQL techniques—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, cumulative sums, and date‑time manipulation—to help data professionals ace interview questions and write cleaner, more powerful queries.
CTEInterview PreparationSQL
0 likes · 11 min read

This article presents ten core SQL techniques—including CTEs, recursive CTEs, temporary functions, CASE WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, cumulative sums, and date‑time manipulation—each explained with clear descriptions and practical query examples to help candidates ace data‑analysis interviews.
CASE WHENCTERanking
0 likes · 11 min read

This article presents ten essential advanced SQL techniques—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking windows, delta calculations, cumulative totals, and date‑time manipulation—each explained with clear examples and code snippets for interview preparation.
CASE WHENCTEData Science Interviews
0 likes · 11 min read

The article explains how Citus extends PostgreSQL to provide distributed tables with full single‑node SQL coverage, enumerates the cross‑node SQL features it cannot handle, and demonstrates concrete workarounds using CTEs and temporary tables with detailed code examples.
CTECitusPostgreSQL
0 likes · 8 min read

MySQL 8.0 introduces several relational‑database enhancements, including invisible indexes for performance tuning, persistent configuration via SET PERSIST, default utf8mb4 character set, support for Common Table Expressions, and window functions, each illustrated with practical SQL examples.
8.0CTEMySQL
0 likes · 7 min read

This article explains common MySQL performance pitfalls such as large‑offset LIMIT, implicit type conversion, sub‑query updates, mixed ordering, EXISTS clauses, and condition pushdown, and shows how to rewrite each pattern using indexes, JOINs, UNION ALL, CTEs and early filtering to achieve execution times measured in milliseconds instead of seconds.
CTEMySQLQuery Performance
0 likes · 13 min read

This article explains several efficient methods—including shell scripts, generated series tables, JSON functions, and MySQL 8.0 recursive CTEs—to quickly locate missing auto‑increment primary key values in a MySQL table, comparing their performance and suitability.
CTEMySQLPrimary Key
0 likes · 12 min read

This article introduces several MySQL 8 enhancements—including invisible indexes for performance testing, the SET PERSIST command for durable configuration changes, default UTF8MB4 encoding, Common Table Expressions for clearer queries, and window functions for ranking and aggregation—illustrated with practical SQL examples.
CTEMySQLWindow Functions
0 likes · 6 min read

This article explores eight common MySQL performance pitfalls—including inefficient LIMIT usage, implicit type conversion, subquery updates, mixed sorting, EXISTS clauses, condition push‑down, early result narrowing, and intermediate result push‑down—and provides rewritten SQL examples that dramatically reduce execution time.
CTEIndexingMySQL
0 likes · 13 min read

This article presents a collection of practical PostgreSQL DBA techniques—including selective updates, bulk‑load optimizations, CTE‑based deduplication, partial and BRIN indexes, correlation tuning, and transactional DDL tricks—to help developers reduce database bottlenecks, improve query speed, and avoid common performance pitfalls.
BRINCTEDevOps
0 likes · 33 min read

This article explains MySQL's metadata lock mechanism and demonstrates how to use the ext.check.get_locks() function from the MySQL Shell plugin—along with a supporting SQL query—to list lock owners, statements, and lock types, including setup steps for MySQL 5.7.
CTEMetadata LockMySQL
0 likes · 3 min read


ITPUBFeb 11, 2020 · Databases
This article presents eight practical MySQL optimization strategies—including LIMIT redesign, implicit type conversion fixes, JOIN rewrites for updates/deletes, mixed sorting tricks, EXISTS elimination, condition push‑down, early data reduction, and intermediate result set push‑down—each illustrated with before‑and‑after queries, execution plans, and measurable speed improvements.
CTELIMIT redesignMySQL
0 likes · 7 min read

This article explains how MySQL's LATERAL join and recursive CTE can be used to compute the number of direct and indirect reports for each employee, demonstrating lateral external references, non‑lateral references, query execution details, and EXPLAIN output in MySQL 8.0.14 and later.
CTELATERALMySQL
0 likes · 8 min read

This article explains how Common Table Expressions (CTEs) simplify hierarchical queries in SQL, covering both non‑recursive and recursive forms, providing step‑by‑step examples for retrieving child, parent, and root categories using MySQL 8 and PostgreSQL 10, along with test data and execution results.
CTEMySQLPostgreSQL
0 likes · 8 min read

This article explores PostgreSQL’s advanced SQL capabilities—including Common Table Expressions (WITH), batch inserts, the RETURNING clause, UPSERT with ON CONFLICT, TABLESAMPLE methods, aggregation functions like string_agg and array_agg, and a range of window functions—providing practical examples, performance insights, and guidance for real‑world use.
CTEPostgreSQLSQL
0 likes · 17 min read

This article introduces MySQL 8's Common Table Expressions (CTEs), explains their syntax and advantages over derived tables, and provides multiple practical examples—including recursive queries, table creation, and usage in INSERT, UPDATE, and DELETE statements—plus a Docker setup tip for MySQL 8.
CTECommon Table ExpressionsDocker
0 likes · 9 min read


ITPUBApr 27, 2018 · Databases
This article walks through MySQL 8.0's key relational‑database enhancements, including invisible indexes for performance testing, the SET PERSIST command for persistent configuration, default utf8mb4 encoding, Common Table Expressions for clearer queries, and window functions for advanced ranking and aggregation.
8.0CTEMySQL
0 likes · 7 min read


21CTOMar 14, 2018 · Databases
Both MySQL 8 and MariaDB 10.2 introduce robust window functions and Common Table Expressions (CTEs), enabling developers to write more efficient, maintainable queries; this article explains their syntax, demonstrates practical examples, compares implementations, and highlights performance and readability benefits across popular database systems.
CTEMariaDBMySQL
0 likes · 13 min read


ITPUBJul 8, 2017 · Databases
A slow SQL Server query that took 35 seconds to load 4,000 rows was dramatically accelerated by analyzing the execution plan, adding targeted non‑clustered indexes, eliminating costly scalar functions, and rewriting the query with CTEs and FOR XML PATH, ultimately achieving a ten‑fold speedup.
CTESQL Server
0 likes · 11 min read

This article introduces Common Table Expressions (CTE) in SQL, explains how they improve query readability and enable writable temporary tables, demonstrates multi‑table modifications, advanced CRUD scenarios, implements a ring‑buffer using CTE, and discusses performance benefits and potential pitfalls.
CTEData ModelingSQL
0 likes · 12 min read


ITPUBFeb 17, 2017 · Databases
This article explains why a SQL Server paging query using TOP can take minutes, demonstrates how switching to ROW_NUMBER() with CTEs, index hints, temporary tables, and hash joins dramatically reduces execution time, and provides practical tips for handling large page numbers.
CTEHash JoinIndex Hint
0 likes · 16 min read

This article walks through a real‑world MySQL performance case where a complex view caused slow queries, explains step‑by‑step analysis, shows how redundant joins and Cartesian products were eliminated with CTEs and EXISTS, and demonstrates how the execution time dropped from 2.5 s to 1.8 s.
CTEMySQLSQL
0 likes · 10 min read


ITPUBJul 6, 2016 · Databases
A developer encountered severe slowdown when joining a remote server query via a CTE in SSIS, analyzed the underlying CTE and Nested Loops behavior, and resolved the issue by materializing the remote data into a temporary table, achieving a dramatic performance boost.
CTESQL ServerSSIS
0 likes · 7 min read

This article examines why PostgreSQL claims to be the most advanced open‑source database by detailing its object‑relational model, extensive native data types, large‑scale size limits, robust ACID compliance, powerful indexing options, flexible virtual table features, built‑in functions, language extensions, and how these capabilities compare to MySQL, MariaDB and Firebird.
CTEJSONPostgreSQL
0 likes · 21 min read


ITPUBJan 1, 2016 · Databases
Discover ten practical PostgreSQL techniques—including CTEs, custom .psqlrc settings, pg_stat_statements, FDWs, array handling, materialized views, window functions, pivot shortcuts, PostGIS, and JSONB—to write cleaner queries, improve performance, and leverage advanced database features.
CTEFDWJSONB
0 likes · 9 min read
