MySQL query duplicate data

Suppose there is a user table, user. The data is as follows: 1. Duplicate uid data in query table SELECT id, uid, name FROM USER WHERE uid IN (SELECT uid FROM USER GROUP BY uid HAVING COUNT(uid) > 1); 2. Duplicate data in the query table, excluding the minimum id SELECT id, uid, name FROM user WHERE uid IN (SELECT ...

Posted on Sat, 16 May 2020 11:25:22 -0400 by dyconsulting

C ා data operation series - 6 EF Core configuration mapping

0. Preface In the introduction to C ා data operation series - 5. EF Core, we simply demonstrate the functions of EF addition, deletion, modification and query through two classes. Careful partners may have looked at the generated DDL SQL statements and found some clues in them. Those who don't look are not in a hurry, so post them. public class ...

Posted on Fri, 15 May 2020 09:44:19 -0400 by mrvijayakumar

Hand-on instructions to read the mybatis core source code, grasp the underlying working principles and design ideas

Mybatis is currently the preferred ORM framework for the Java system of Internet companies. It has natural advantages. Many students only focus on the writing of CRUD programs for their company business, ignoring the importance of source reading.Here's a code sample written using the Mybatis API: String resource = "mybatis-config.xml"; InputStr ...

Posted on Fri, 15 May 2020 00:37:48 -0400 by daz_effect

Getting Started with Druid 0.17 - A Complete Data Query Style

This article describes how Druid queries data. First, we ensure that the data has been loaded successfully. Druid queries are based on HTTP, and Druid provides a query view and formats the results. Druid provides three query modes, SQL, native JSON, CURL. 1. SQL Query Let's use wiki's data as an example Query the top 10 page edits SELECT page, ...

Posted on Thu, 14 May 2020 22:59:14 -0400 by amorphous

Stored procedure - exception capture & printing exception information

catalog 0. Background 1. Create the exception information table ErrorLog 2. Establish a stored procedure to save exception information 3. Establish a stored procedure for printing exception information in SQL Server 4. Create a stored procedure for testing to throw exceptions for testing 5. Reference information ...

Posted on Wed, 13 May 2020 21:17:48 -0400 by solodesignz

Using AutoFac in WebApi

Using AutoFac in WebApi (I) The previous article said how to use AutoFac, but there is still a problem: when an interface has multiple implementation classes, how to distinguish the implementation classes? There are many solutions, such as named < T > and so on, but they all need to register separately. If it is less, it will be a bit tro ...

Posted on Wed, 13 May 2020 10:18:58 -0400 by FrozNic

search (12) - elastic4s aggregate = bucket + Measure

This article introduces the aggregation function of ES. Aggregation is the main tool for visualizing index data into readable and useful data. Aggregation consists of bucket and metrics. The so-called bucket is the group by of SQL, as follows: GET /cartxns/_search { "size" : 2, "aggs": { "color": { "terms": {"field": "color.keywo ...

Posted on Tue, 12 May 2020 12:03:27 -0400 by spicey

C ා log4net learning notes: log to database

I. data preparation To create a log data table LogDetail in SQL Server: CREATE TABLE [dbo].[LogDetail]( [LogID] [INT] IDENTITY(1,1) NOT NULL, --Self increasing ID [LogDate] [DATETIME] NULL, --Log time [LogLevel] [NVARCHAR](10) NULL, --log level [LogThread] [NVARCHAR](10) NULL, --thread ID [Logger] [NV ...

Posted on Tue, 12 May 2020 09:48:01 -0400 by nathus

tpcc instructions

Note: the content of the article originated from the network and was obtained through our own experiment; however, the reference article address was not recorded at that time. If you find any infringement problem, please leave a message. 1, Introduction Stress test means that before MySQL goes online, a large number of stress tests need to be ...

Posted on Mon, 11 May 2020 03:26:33 -0400 by Balu

Analysis of Hadoop YARN ResourceManager crash caused by data limit of ZooKeeper node

This problem makes us encounter again. It happens infrequently, but once it happens, it will cause resource manager service crash, ZK registration watch too many and other problems. It has always been a hindrance to not completely solve this problem, so based on the previous two times of analysis and reading the latest version of Hadoop 3.2.1 c ...

Posted on Sun, 10 May 2020 10:38:53 -0400 by FireWhizzle