Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I have a solutions that works using 'create function - unnest - ordinality - cardinality', but still I hece the same error:
I do not what is happening....any suggestion? Thks
--- Caused by: ---
PG::UndefinedFunction:
ERROR: operator does not exist: integer[] + integer[]
LINE 1: SELECT id, a, b, c, a + b AS "a + b", (a + b) + c AS "(a + b...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
/usr/local/bundle/gems/sequel-5.47.0/lib/sequel/adapters/postgres.rb:156:in `exec'
No examples found.
I am following an approach with "WITH RECURSIVE xxx", am I in the right way? Some feedback will be useful Regards
Any suggestion about my code, it does not work!!!!
CREATE OR REPLACE FUNCTION sumtot()
RETURNS TABLE(tbl text, col text, val bigint)
LANGUAGE plpgsql AS
$func$
DECLARE
row_aux1 record;
BEGIN
FOR r_aux1 IN
LOOP
RETURN QUERY EXECUTE
'SELECT ' || r_aux1 || '.tbl, ' || r_aux1 || '.col, sum(' || r_aux1 || '.col) as val
FROM ' || r_aux1 || '.tbl';
END LOOP;
END
$func$;
select sum (val) as total
from sumtot ()
'a' should equal 'b'
means'your_answer' is not equal to 'the_correct_answer'
.I am passing the test, but when a tried to submit appears this kind of message. Can any body explain me the meaning of this output? [(-4.858929811522968, 0.2269496944683853), (-4.840078207932429, 0.21312952312188882)] should equal [(-3.5587688552056695, -2.2272483581593514), (-3.550921135594966, -2.2265393538098217)]
[(1.8352727691108854, -0.139842271493766), (1.838386896423125, -0.13485179949526183)] should equal [(2.0181619767831975, 0.966640896611003), (2.019942455045757, 0.9688923640365206)]
[(-1.1177824333558144, 1.0732807838376273), (-1.1137508275351435, 1.0743278696785632)] should equal [(-0.9632187422049228, 1.327878316853926), (-0.962858502531326, 1.326125436930604)]