MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_within_group_multi

Method test_within_group_multi

test/sql/test_functions.py:992–1006  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

990 )
991
992 def test_within_group_multi(self):
993 stmt = select(
994 table1.c.myid,
995 func.percentile_cont(0.5).within_group(
996 table1.c.name, table1.c.description
997 ),
998 )
999 self.assert_compile(
1000 stmt,
1001 "SELECT mytable.myid, percentile_cont(:percentile_cont_2) "
1002 "WITHIN GROUP (ORDER BY mytable.name, mytable.description) "
1003 "AS percentile_cont_1 "
1004 "FROM mytable",
1005 {"percentile_cont_2": 0.5},
1006 )
1007
1008 def test_within_group_desc(self):
1009 stmt = select(

Callers

nothing calls this directly

Calls 4

selectFunction · 0.90
percentile_contMethod · 0.80
assert_compileMethod · 0.80
within_groupMethod · 0.45

Tested by

no test coverage detected