MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_within_group

Method test_within_group

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

Source from the content-addressed store, hash-verified

976 )
977
978 def test_within_group(self):
979 stmt = select(
980 table1.c.myid,
981 func.percentile_cont(0.5).within_group(table1.c.name),
982 )
983 self.assert_compile(
984 stmt,
985 "SELECT mytable.myid, percentile_cont(:percentile_cont_2) "
986 "WITHIN GROUP (ORDER BY mytable.name) "
987 "AS percentile_cont_1 "
988 "FROM mytable",
989 {"percentile_cont_2": 0.5},
990 )
991
992 def test_within_group_multi(self):
993 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