I am using TPC-H Benchmark to do some studies, and i have been having some difficulties to understand and find the correct functions to use on sql server.
What is the meaning of :n -1 at the end of the file? What is the meaning of this c_mktsegment = ':1'. How to do this operation,
and o_orderdate < date ':2'
I am going to save a file just as example.
-- $ID$ -- TPC-H/TPC-R Shipping Priority Query (Q3) -- Functional Query Definition -- Approved February 1998
l_orderkey,
sum(l_extendedprice * (1 - l_discount)) as revenue,
o_orderdate,
o_shippriority
from
customer,
orders,
lineitem
where
c_mktsegment = ':1'
and c_custkey = o_custkey
and l_orderkey = o_orderkey
and o_orderdate < date ':2'
and l_shipdate > date ':2'
group by
l_orderkey,
o_orderdate,
o_shippriority
order by
revenue desc,
o_orderdate;
:n 10```
I did try to find some examples saying the conversion of the queries to sql server queries, but it seems its already sql server queries, but still, couldnt find the right conversion as if i try toi research some lines of code, i cant find anything.
when i run the code it shows me for example
Msg 102, Level 15, State 1, Line 19
Incorrect syntax near ':2'.