Get data from a specific week relative to the date in SQL

catalogue introduce background So we need to be more complicated Points of interest A QA question needs "last week's data", which makes me think. Using the DATEADD function with a "WW" interval is easy, but it subtracts 7 days from today. This is different from "last week", because "last week" sta ...

Added by eldee on Thu, 17 Feb 2022 16:19:17 +0200

Explain in detail the whole process of MySQL high availability switching troubleshooting caused by slow SQL failure

In the later operation and maintenance of MySQL database, DBAs sometimes encounter such a phenomenon: when troubleshooting the problem, they find that the active and standby MySQL has been switched, and it is normal to check the MySQL service. DBAs have not done the switching operation, and the server has not been maintained. Fortunately, the b ...

Added by glennn3 on Thu, 17 Feb 2022 14:19:18 +0200

Redis data type and basic operation

catalogue string basic operation Add and modify data get data Delete data Add and delete the value of key Set the life time of the key hash basic operation get data Delete data Check for data list  basic operation Add and modify data Get data set basic operation Add data get data Delete data sorted_set basic operati ...

Added by transformationstarts on Wed, 16 Feb 2022 18:55:36 +0200

MySQL-19- MySQL data type

1. Data types in MySQL typeType exampleInteger typeTINYINT, SMALLINT, MEDIUMINT, int (or INTEGER), BIGINTFloating point typeFLOAT,DOUBLEFixed point number typeDECIMALBit typeBITDate time typeYEAR,TIME,DATE,DATETIME,TIMESTAMPText string typeCHAR,VARCHAR,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXTEnumeration typeENUMCollection typeSETBinary string typeBIN ...

Added by acemods on Wed, 16 Feb 2022 16:32:29 +0200

Database design of commodity management system -- SQL Server

Links 1. Database design of student achievement management system - MySQL Database design of student achievement management system - MySQL 2. Medical information management system database – MySQL Medical information management system database – MySQL 3. Mail management database design – MySQL Mail management databas ...

Added by antonbrk on Wed, 16 Feb 2022 14:06:05 +0200

SQL sever basic learning 3 (aggregation and sorting)

I Aggregate query Aggregate functionmeaningcount()Calculate the number of records (rows) in the tablesum()Calculate the total value of the values in the value column in the tableavg()Calculate the average of the data in the value column in the tablemax()Find the maximum value of data in any column in the tablemin()Find the minimum value of d ...

Added by Christopher on Wed, 16 Feb 2022 11:43:43 +0200

Redis traverses and vaguely matches the two commands key s and scan (python uses redis)

Redis traverses and vaguely matches the two commands key s and scan (python uses redis) (1) Full traversal – keys command Get all keys in Redis: import redis pool=redis.ConnectionPool(host='10.3.1.151',port=6379,password='mca321',db=2) r = redis.tRedis(connection_pool=pool) # Get change = all keys under the database keys = r. ...

Added by dirkdetken on Wed, 16 Feb 2022 10:03:00 +0200

redis data type

1.String Stored data: single data, the simplest data storage type and the most commonly used data storage typeFormat of stored data: one storage space holds one dataStorage content: string is usually used. If the string is displayed in the form of integer, it can be used as digital operation 1.1 adding / modifying data set key value 1.2 d ...

Added by griff04 on Wed, 16 Feb 2022 09:36:41 +0200

Summary of "table" skills in SQL query

SELECT Field name FROM Table name On the spot, I whispered... That the keyword FROM indicates the table name to obtain the field information. If the data source is an Excel table, you need to add the dollar sign $after the table name and wrap it in square brackets, such as [Sheet1 $] In fact, the above example is the simplest case where S ...

Added by Styles2304 on Wed, 16 Feb 2022 02:55:39 +0200

Chapter 55 SQL function% EXTERNAL

Chapter 55 SQL function% EXTERNAL Format conversion function that returns an expression in display format. outline %EXTERNAL(expression) %EXTERNAL expression parameter Expression - the expression to convert. A field name, an expression containing a field name, or a function whose return value is a convertible data type, such as DATE ...

Added by moyse on Wed, 16 Feb 2022 01:59:53 +0200