prueba tecnica
This commit is contained in:
19
db/07_GetAllRates.sql
Normal file
19
db/07_GetAllRates.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
DROP FUNCTION IF EXISTS public.get_rates();
|
||||
|
||||
CREATE OR REPLACE FUNCTION public.get_rates()
|
||||
RETURNS TABLE (
|
||||
Id INTEGER,
|
||||
Name VARCHAR,
|
||||
Price MONEY
|
||||
)
|
||||
AS $$
|
||||
SELECT
|
||||
c.id,
|
||||
c.name,
|
||||
c.price
|
||||
FROM public.rates AS c
|
||||
ORDER BY c.id;
|
||||
$$ LANGUAGE SQL STABLE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user