tst.valsortkeypos.d revision 178477
1168515Sgshapiro/*
2168515Sgshapiro * CDDL HEADER START
3168515Sgshapiro *
4132943Sgshapiro * The contents of this file are subject to the terms of the
5168515Sgshapiro * Common Development and Distribution License (the "License").
6132943Sgshapiro * You may not use this file except in compliance with the License.
7168515Sgshapiro *
890792Sgshapiro * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9168515Sgshapiro * or http://www.opensolaris.org/os/licensing.
1090792Sgshapiro * See the License for the specific language governing permissions
11168515Sgshapiro * and limitations under the License.
12168515Sgshapiro *
1390792Sgshapiro * When distributing Covered Code, include this CDDL HEADER in each
1490792Sgshapiro * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1590792Sgshapiro * If applicable, add the following below this CDDL HEADER, with the
1690792Sgshapiro * fields enclosed by brackets "[]" replaced with your own identifying
1790792Sgshapiro * information: Portions Copyright [yyyy] [name of copyright owner]
18168515Sgshapiro *
1990792Sgshapiro * CDDL HEADER END
20168515Sgshapiro */
2190792Sgshapiro
2290792Sgshapiro/*
23168515Sgshapiro * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24168515Sgshapiro * Use is subject to license terms.
25168515Sgshapiro */
26168515Sgshapiro
27168515Sgshapiro#pragma	ident	"%Z%%M%	%I%	%E% SMI"
28168515Sgshapiro
29168515Sgshapiro
30168515Sgshapiro/*
31168515Sgshapiro * ASSERTION:
32168515Sgshapiro * 	aggsortkeypos option works when sorting by values, values are
33168515Sgshapiro * 	equal, and keys are compared to break the tie
3490792Sgshapiro *
3590792Sgshapiro * SECTION: Aggregations, Printing Aggregations
36168515Sgshapiro *
37168515Sgshapiro */
38168515Sgshapiro
39168515Sgshapiro#pragma D option quiet
40168515Sgshapiro#pragma D option aggsortkeypos=1
41168515Sgshapiro
42168515SgshapiroBEGIN
43168515Sgshapiro{
44168515Sgshapiro	@[1, 3] = sum(0);
45168515Sgshapiro	@[2, 2] = sum(0);
46168515Sgshapiro	@[3, 1] = sum(0);
4790792Sgshapiro
4890792Sgshapiro	exit(0);
49168515Sgshapiro}
50168515Sgshapiro