`

The function of " distinct on"

 
阅读更多


A B C D
1 1 2 3
1 1 2 4
1 1 2 5

select distinct on (A,B,C) A,D,C,D from hoo order by A,B,C,D
output

A B C D
1 1 2 3


select distinct on (A,B,C) A,D,C,D from hoo order by A,B,C,D desc;
A B C D
1 1 2 5
分享到:
评论

相关推荐

    Algebraic Functions

    Here one finds a thorough treatment of the problem of reducing the singularities of an algebraic curve, by means of a birational transformation, to double points with distinct tangents. This question...

    微软内部资料-SQL性能优化5

    The number of levels in an index will vary depending on the number of rows in the table and the size of the key column or columns for the index. If you create an index using a large key, fewer ...

    Printed circuit board design techniques for EMC compliance

    The focus of this book is strictly on the PCB. Containment techniques (shielding), internal and external cabling, power supply design, and other system-level subassemblies that use PCBs as a ...

    用遗传算法设计适应特殊地形的二维汽车

    The optimality of a particular candidate solution (the fitness function) is determined by how far it travels before a) a mass touches the ground or b) time runs out. Note that at the beginning, the ...

    C in a Nutshell, Second Edition

    it includes an overview of the contents of the standard headers and a description of each standard library function. Part III provides the necessary knowledge of the C programmer's basic tools: the ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Header Files The #define Guard Header File Dependencies Inline Functions The -inl.h Files Function Parameter Ordering Names and Order of Includes Scoping Namespaces Nested Classes Nonmember, Static ...

    Network.Programming.With.Perl

    If a program makes use of an unusual or previously undiscussed function (and lots of them do, because one of the author’s missions is to introduce the contents of specialized libraries), its syntax ...

    雷达技术知识

    LiDAR and the effects of water surface roughness on LiDAR within the active channel. Findings shed light on the utility of LiDAR for measuring water surface slopes in different stream environments and...

    微软内部资料-SQL性能优化3

    An intent lock indicates that SQL Server wants to acquire a shared (S) lock or exclusive (X) lock on some of the resources lower down in the hierarchy. For example, a shared intent lock placed at the ...

    An Iterative Spanning Forest Framework for Superpixel Segmentation

    In this paper, we propose an Iterative Spanning Forest (ISF) framework, based on sequences of Image Foresting Transforms, where one can choose i) a seed sampling strategy, ii) a connectivity function,...

    VB编程资源大全(英文源码 控件)

    It mimics the Microsoft Outlook's Vertical Menu bar which appears on the left of the screen<END><br>35 , progbar.zip This is a great replacement for the standard VB progress bar. Its smooth, ...

    occam一维反演

    c As the response of the model in dm() is not necessarily the response of the final c model found, but rather the response of the last model tested in the univariate c optimization routines, we leave ...

    Professional C# 3rd Edition

    The Role of C# in the .NET Enterprise Architecture 24 Summary 26 Chapter 2: C# Basics 29 Before We Start 30 Our First C# Program 30 The Code 30 Compiling and Running the Program 31 Contents A Closer ...

    Matrix Differential Calculus with Applications in Statistics and Econometrics

    4The differential of a vector function . . . . . . . . . . . . . . . . 93 5Uniqueness of the differential . . . . . . . . . . . . . . . . . . . 95 6Continuity of differentiable functions . . . . . . ....

    Absolute Database for D7

    Tree indexes with high-speed on thousands and on millions of records Buffered transactions for batch inserts, updates and deletes In-memory tables for fast operations with data loaded into memory ...

    Graphics Gems (Vol.2)

    10.A Recursive Implementation of the Perlin Noise Function C 396 Greg Ward I I I I IX X X X X C C C C CURVES AN URVES AN URVES AN URVES AN URVES AND D D D D SURFACES SURFACES SURFACES SURFACES ...

    矩阵学习资源

    4 The di�erential of a vector function . . . . . . . . . . . . . . . . 93 5 Uniqueness of the di�erential . . . . . . . . . . . . . . . . . . . 95 6 Continuity of di�erentiable functions . . . . . ...

    Sql for mysql

    4.2 Logging On to the MySQL Database Server . . . . . . . . . . . . . . . 41 4.3 Creating New SQL Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.4 Creating Databases . . . . . . ...

    oracle sql of extracting table structure

    * Function : to extract the structure of a table * * Author : Richard Wang * * Date : 2011-08-30 * * Version : 0.1 * ------------------------------------------------------------------------------*/ ...

    TMS Component Pack v8.3.4.0 - Delphi 10.1 Berlin Full Source

    - Improved : DistinctValues function now returns distinct column values irrespective of hidden rows - Improved : Shift-Enter key handling for moving to the previous cell - Improved : AppendToCSV() ...

Global site tag (gtag.js) - Google Analytics