SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create or replace function following_videos() returns table(video_id uuid, description text) as $func$ select videos.id as video_id, videos.description from videos inner join users on videos.user_id = users.id where videos.user_id in ( select follower_user_id from follow where auth.uid() = following_user_id ) and where videos.id not in ( select video_id from likes where user_id = auth.uid() ); $func$ language sql security invoker;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear