遇到一个编程题是查询指定的某一天内的数据,并按每一页查询两百条

遇到一个编程题是查询指定的某一天内的数据,并按每一页查询两百条。create table orders
(
id serial primary key,
product_id integer,
order_date date default now(),
quantity integer,
customer_id integer
);

可以试试这个语句 希望对你有所帮助 【望采纳】


select id, 
       product_id, 
       order_date, 
       quantity, 
       customer_id
from orders
where date = $1
offset $2 limit 200;