MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_within_group_multi

Method test_within_group_multi

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

Source from the content-addressed store, hash-verified

909 )
910
911 def test_within_group_multi(self):
912 stmt = select(
913 table1.c.myid,
914 func.percentile_cont(0.5).within_group(
915 table1.c.name, table1.c.description
916 ),
917 )
918 self.assert_compile(
919 stmt,
920 "SELECT mytable.myid, percentile_cont(:percentile_cont_1) "
921 "WITHIN GROUP (ORDER BY mytable.name, mytable.description) "
922 "AS anon_1 "
923 "FROM mytable",
924 {"percentile_cont_1": 0.5},
925 )
926
927 def test_within_group_desc(self):
928 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