Tag:by

  • Detailed explanation of the comparison between partition by and group by

    Time:2021-1-9

    Today, I understand the difference and connection between partition by and group by. 1. Group by is a grouping function, and partition by is an analysis function (and then sum() is an aggregation function); 2. In the order of execution, The following is the priority of common SQL keywords from > where > group by […]

  • Ajax traversal

    Time:2020-11-25

    1. Ajax enhancementSynchronous request: the user can’t do any operation while operating a certain task, and can only wait for the task to be completed, so the user’s friendliness is poorAsynchronous request: the user sends the request to the Ajax engine and then to the server, which must be supported by callback function$.get(“/findAjax”,function (result) {})Traversal […]

  • Three methods of deleting duplicate records in Oracle query

    Time:2020-11-14

    For example, there is a personnel table (Table Name: peosons)If you want to record the name, ID number and address of the three fields exactly the same, Copy codeThe code is as follows: select p1.*   from persons  p1,persons  p2   where p1.id<>p2.id   and  p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address = p2.address The above […]

  • Report function developed by Oracle

    Time:2020-11-2

    1、 Look back《Window function of Oracle development》In the section on full statistics, we use the following information provided by Oracle: Copy codeThe code is as follows: sum(sum(tot_sales)) over (order by month rows between unbounded preceding and unbounded following) This function will be executed once every time a record is retrieved in the process of record […]

  • Analysis function summary of Oracle development

    Time:2020-11-1

    This article is a summary of all previous articles on analysis functions 1、 Statistics: Copy codeThe code is as follows: Sum() Over ([Partition by ] [Order by ])    Sum() Over ([Partition by ] [Order by ]       Rows Between  Preceding And  Following)        Sum() Over ([Partition by ] [Order by ]      Rows Between  […]

  • Why SQL Server2008 order by cannot be used directly in union clause

    Time:2020-9-25

    According to the requirements, each takes top 20. Since it is random, SQL Server order by newid() is used, and then all the data are unionized. So I immediately gave the answer: selecttop 20 *fromxxxwheretype=1orderbynewid() union selecttop 20 *fromxxxwheretype=0orderbynewid() But the SQL query analyzer is wrong and the syntax is wrong. At first glance, it […]

  • Spring cloud Alibaba architecture

    Time:2020-9-1

    You can’t do java without spring. Using java for microservice development can’t get around spring cloud. With the restart of Dubbo and its maintenance by the Apache open source community, Dubbo ecology has become more and more perfect. Although it is not appropriate to compare spring cloud with Dubbo, many friends will choose Dubbo or […]

  • Vue + ES6 async and await

    Time:2020-6-22

    effect:asyncandawaitIs used to handle asynchronous. It needs to be executed asynchronously like synchronization. After the result is returned asynchronously, the execution will continue according to the result. awaitMust be placed inasyncThe function is to wait for the resolution of promise, which is blocked asyncUsed to declare afunctionIt’s asynchronous,andawaitUsed to wait for the execution of an […]

  • SQL median function instance

    Time:2020-3-13

    Table or total sales Table: SQL statement: Copy codeThe code is as follows: SELECT * from (     SELECT a1.Name, a1.Sales, COUNT(a2.sales) Sales_Rank     FROM Total_Sales a1, Total_Sales a2     WHERE a1.Sales < a2.Sales or (a1.Sales=a2.Sales and a1.Name = a2.Name)     GROUP BY a1.Name, a1.Sales     ORDER BY a1.Sales DESC, a1.Name DESC ) as tab […]

  • Mongodb error 32 bit servers don’t have journaling enabled by default solution

    Time:2020-3-11

    Every time mongodb is started, the following unclean shutdown prompt is always received. The causes and solutions of this problem are summarized. The tips are as follows: Copy codeThe code is as follows: ************** D:\GREENT~1\PowerCmd>mongod –auth -dbpath C:\mongo\MongoDB\mongo\data Wed May 16 16:06:50 Wed May 16 16:06:50 warning: 32-bit servers don’t have journaling enabled by default. […]

  • SQL2005 sorts the numbers according to the specified fields

    Time:2019-12-26

    The SQL statement is as follows: Copy codeThe code is as follows: WITH Table 1 AS( Select number field name, row_number() over (order by field name DESC) as rownumFROM table name) Update Table 1Set number field name = rownum Application scenario:The group is ranked according to the group popularity value through such SQL statement: Copy […]

  • The difference between order by and group by in SQL

    Time:2019-12-13

    In English, order by means of row sorting, which is ascending by default. The sorted field names must be listed after order by, which can be multiple field names. Group by means of English. There must be an aggregate function to work with. At least one grouping flag field is required. What is aggregate function? […]