› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
noipnoid
V2EX  ›  MySQL

新手求一个单表无效数据去重的思路

  •  
  •   noipnoid · Apr 22, 2020 · 3067 views
    This topic created in 2388 days ago, the information mentioned may be changed or developed.
    A 字段跟 B 字段相同,并且记录的 create_time 间隔小于时间 5 分钟的记录,取时间最前的那一条记录
    2 replies  •  2020-04-22 15:23:36 +08:00
    xizismile
    xizismile
    Apr 22, 2020 via Android
    1
    sql 去重?整到应用层来处理这个逻辑不香吗?
    KentY
    KentY
    Apr 22, 2020
    2
    我 sql-fu 很一般. 但是这个看起来相对容易啊

    from Table where a=b and create_ts > "5min ago" order by create_ts limit 1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2539 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:07 · PVG 23:07 · LAX 07:07 · JFK 10:07
    ♥ Do have faith in what you're doing.