日记-20221128

公司疫情管的越来越严了, 除了需要24小时的核酸外, 今天开始又增加了抗原测试, 层层加码啊,折腾 早上Deep Dive又看了2章,接下去要换一个部分将性能调优了, 道德经看了大概半小时, 然后,在内部服务器上看了一个Query Store的视频, 然后在国外网站,把没看完的Query Store视频继续看完, 下午的时候,开始看Query Store的pdf,今天看了第一章 每天一章吧,争取这周出个PPT初稿。

日记-20221124

今天看SQL Deep Dive两章 还是同样的进度 看道德经三章,今天的视频都比较短 T-SQL性能调优秘笈 第五章后半段扫过,全书完, 这本书还是很难,以后还要再看几遍 在视频网站看了内存临时数据库元数据的介绍, 这个我自己也做个一个ppt介绍,所以大都看懂了, 里面还有一些不启用的替代方案,看的不是很明白,不明觉厉 jz 整理题目的还有启动 有些偷懒。

日记-20221117

今天又整理了一些SQL题目, 把“简单”那一章的题目过了一遍 其实也不简单。 在博客上也分享一下吧, 说不定有学SQL Server的人能看到。   —————————————————– — 如果在自己的测试DB跑的话,可以跑一下注释的脚本 —————————————————– /* CREATE TABLE competition_list( team_name NVARCHAR(8) ) INSERT INTO competition_list (team_name) VALUEs (N’谁与争锋队’) ,(N’必胜队’) ,(N’乘风破浪队’) ,(N’群英汇队’) ,(N’梦之队’) */ –题目1:比赛名单整理 –问题:每个参赛队伍都会和其他参赛队伍开展一次组队比赛,要求输出两两参赛队伍的所有比赛情况组合 –(两者分别为队伍A和队伍B),并按队名依次升序排列 — select * from competition_list –结果 –队伍 A 队伍 B –乘风破浪队 必胜队 –乘风破浪队 梦之队 –乘风破浪队 群英汇队 –乘风破浪队 谁与争锋队 –必胜队 梦之队 –必胜队 群英汇队 –必胜队 谁与争锋队 –梦之队 群英汇队 –梦之队 谁与争锋队 –群英汇队 谁与争锋队 SELECT a.team_name AS ‘队伍 A’ ,b.team_name AS ‘队伍 B’ FROM competition_list a INNER JOIN competition_list b ON a.team_name < b.team_name ORDER BY a.team_name, b.team_name; /* CREATE TABLE product_promotion( commodity_id VARCHAR(8), start_date DATE, end_date DATE ) INSERT INTO product_promotion (commodity_id,start_date,end_date) VALUES (‘a001′,’2021-01-01′,’2021-01-06’) ,(‘a002′,’2021-01-01′,’2021-01-10’) ,(‘a003′,’2021-01-02′,’2021-01-07’) ,(‘a004′,’2021-01-05′,’2021-01-07’) ,(‘b001′,’2021-01-05′,’2021-01-10’) ,(‘b002′,’2021-01-04′,’2021-01-06’) ,(‘c001′,’2021-01-06′,’2021-01-08’) ,(‘c002′,’2021-01-02′,’2021-01-04’) ,(‘c003′,’2021-01-08′,’2021-01-15′); */ –题目2:参与优惠活动的商品 –commodity_id商品ID,start_date商品优惠活动开始日期,end_date商品优惠活动结束日期 –问题:查询在2021年1月7日至2021年1月9日期间参与优惠活动的商品 –select * from product_promotion –结果 –commodity_id –a002 –a003 –a004 –b001 –c001 –c003 select commodity_id from product_promotion where (start_date<=’2021-1-7′ and end_date>=’2021-1-9′) or(end_date>=’2021-1-7′ and end_date<=’2021-1-9′) or(start_date>=’2021-1-7′ and start_date<=’2021-1-9′) or(start_date>=’2021-1-7′ and end_date<=’2021-1-9′) /* CREATE TABLE sold_succession( order_id INT, commodity_id VARCHAR(8) ) INSERT INTO sold_succession (order_id,commodity_id) VALUES (1,’c_001′) ,(2,’c_001′) ,(3,’c_002′) ,(4,’c_002′) ,(5,’c_002′) ,(6,’c_001′) ,(7,’c_003′) ,(8,’c_003′) ,(9,’c_003′) ,(10,’c_003′) ,(11,’c_001′); */ –题目3:连续售出的商品 –问题找出连续下单大于或等于3次的商品ID –select * from sold_succession –结果 –commodity_id –c_002 –c_003 SELECT commodity_id ,order_id ,LAG(order_id,2) OVER (PARTITION BY commodity_id ORDER BY order_id) AS temp FROM sold_succession order by order_id SELECT DISTINCT […]

日记-20221116

办公室好冷啊, 问了总务,要10度以下才开热泵,冷死了,小腿冷。 双十一的时候,又买了一批书   1 SQL经典实例 2 SQL编程思想 3 SQL数据分析 4 SQL基础教程 5 SQL进阶教程 6 SQL必知必会   这两天扫了一下,感觉都比较基础,也好,巩固一下, 今天在翻《SQL数据分析》,翻到后半段,是很多题目 有简单,中等,高难度之分, 看了一些简单的,发现也不简单,虽然它的实现是MySQL, 但SQL是相通的,运用到SQL Server里也是可以操作的, 等我把题目都看完了, 自己建个数据库,把表数据填充好, 做一个小的习题集,给大家做脑力训练,开阔SQL写法的思路。  
  • 1
  • 2
Recent Posts

HiddenMerit Daily · Issue 60

# 📊 HiddenMerit Daily · Issue 60 > **Focus on Database Frontiers, Practical Insights for DBAs** > July 22, 2026 | 5 Selected Global Breaking News ## 01|Oracle Releases Largest Quarterly Patch in History: 1,449 Patches Fix 1,235 CVEs, 261 Critical On July 21, Oracle released its July 2026 Critical Patch Update (CPU), setting a record for the largest single patch release in the company’s history. This CPU contains **1,449 security patches** fixing **1,235 independent CVEs** across 32 Oracle product families, of which **261 patches are rated Critical**. **Patch Distribution by Product Family**: | Product Family | Patches | Remotely Exploitable Without Authentication | |—————-|———|———————————————| | Oracle E‑Business Suite | 410 | 45 | | Oracle Fusion Middleware | 355 | 219 | | Oracle Communications | 168 | 122 | | Oracle MySQL | 54 | 9 | | Oracle Database Server | 15 | 6 | **Context for This Patch**: Oracle had already issued an urgent “Prepare Now” warning a week earlier, emphasising that AI is fundamentally lowering the barrier to discovering and exploiting vulnerabilities – frontier AI models can analyse software changes, reverse‑engineer security patches, and develop attack paths at unprecedented speed. Oracle has collaborated with state‑of‑the‑art […]

HiddenMerit Daily · Issue 59

# 📊 HiddenMerit Daily · Issue 59 > **Focus on Database Frontiers, Practical Insights for DBAs** > July 21, 2026 | 5 Selected Global Breaking News ## 01|Oracle Issues Urgent Warning: July 21 Release Update to Fix Large Number of High‑Risk Vulnerabilities, Immediate Deployment Recommended On July 13, Oracle issued an urgent security warning, strongly recommending that all customers running supported Oracle Database versions (including Oracle Database 19c and Oracle AI Database 26ai) immediately test and deploy the Release Update (RU) after its release on July 21. **Background**: New frontier AI models are significantly lowering the barrier to discovering and exploiting software vulnerabilities – these models can identify weaknesses, analyse software changes, reverse‑engineer security patches, and develop potential attack paths at unprecedented speed and scale. AI models are also becoming increasingly adept at combining multiple weaknesses across the application and data stack into complex attacks, even when individual weaknesses do not themselves pose a serious risk. As a result, protecting systems solely at the network or application layer is no longer sufficient; enterprises must protect the entire technology stack. **Fixes Included in This RU**: Oracle has collaborated with state‑of‑the‑art models from Anthropic and OpenAI to proactively identify and fix potential […]

HiddenMerit Daily · Issue 58

# 📊 HiddenMerit Daily · Issue 58 > **Focus on Database Frontiers, Practical Insights for DBAs** > July 20, 2026 | 5 Selected Global Breaking News ## 01|CAICT: Domestic Databases Enter Core System “Deep Water,” AI‑Native Leads New Industry Landscape On July 9, at the 2026 Trustworthy Database Development Conference, CAICT released the “Database Development Research Report (2026).” The report notes that domestic databases have basically completed peripheral system replacement and have officially entered the **critical business system breakthrough phase**. **Key Data**: – The global database market reached **$131.6 billion** in 2025 (approximately RMB 894.09 billion). – The Chinese database market reached **$9.49 billion** in 2025 (approximately RMB 64.48 billion), and is expected to reach **RMB 97.974 billion** by 2028, with a CAGR of 13.06%. – The number of domestic database vendors has shrunk from a peak of 167 to 94, with a clear head‑concentration effect and an intensifying “Matthew effect.” **AI‑Native Becomes the Main Theme**: The report points out that database technology is accelerating its evolution toward the **AI‑native direction**, and the global database industry is entering a new phase of landscape restructuring. The role of databases is upgrading from “underlying support systems” to “core engines enabling intelligent decision‑making […]

HiddenMerit Daily · Issue 56

# 📊 HiddenMerit Daily · Issue 56 > **Focus on Database Frontiers, Practical Insights for DBAs** > July 6, 2026 | 5 Selected Global Breaking News ## 01|Kingware Releases Manufacturing Scenario Database Evolution White Paper: SQL Server Replacement Enters “Deep Water” On July 5, CETC Kingware published a technical article titled “Database Evolution in Manufacturing Scenarios: How Kingware Replaces SQL Server,” pointing out that the data surge on industrial shop floors has exceeded the processing capacity of single‑node systems. Traditional database architectures that rely on vertical scaling are facing unprecedented performance challenges. Over the next 1‑3 years, manufacturing enterprises will no longer face only the “choice of replacement,” but must answer the strategic question: “How do we build an autonomous data foundation in the context of de‑IOE?” **Three Paradigm Shifts**: 1. **Hybrid Workloads Become the Norm**: The IT architecture of modern factories is shifting from separated OLTP and OLAP to HTAP mode. The same data system must simultaneously handle tens of thousands of device instruction writes per second and minute‑level production report analysis. 2. **Distributed Architecture Becomes a Hard Requirement**: When a single table exceeds 100 million rows with daily increments exceeding 1 million rows, the index maintenance cost of […]