What means key word distinct in SQL?
How many rows this query takes from the table in terms of percent of rows taken to the whole number of rows?
What is the ratio number of stores taken to tool rows in the table?
What was your question BTW?
Can any one tell me how to acess ?
How MySQL is related to this?
any algorithms groups in telegram?
What means key word distinct in SQL?
telegram grps related to artificial intelligence
What means key word distinct in SQL?
go to sqlbolt.com and learn it
What means key word distinct in SQL?
It means to get unique records
Or maybe it’d be better to say not repeat
No, distinct is not used with aggregate functions
SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT(*) AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= DATE ‘1998-12-01’ – INTERVAL ‘108’ DAY
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;

SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT(*) AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= DATE ‘1998-12-01’ – INTERVAL ‘108’ DAY
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;
And what?
What about?
SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT(*) AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= DATE ‘1998-12-01’ – INTERVAL ‘108’ DAY
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;
For query operations, you generally have indexes to reduce time taken for comparisons or full table lookups

SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT(*) AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= DATE ‘1998-12-01’ – INTERVAL ‘108’ DAY
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;
How many rows this query takes from the table in terms of percent of rows taken to the whole number of rows?
What is the ratio number of stores taken to tool rows in the table?
This is a json field.
Should not be used actually
SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE * (1 – L_DISCOUNT) * (1 + L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT(*) AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= DATE ‘1998-12-01’ – INTERVAL ‘108’ DAY
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;
L_shipdate here is a potential field for the index, but you have an open interval got your condition, it potentially can take big part of the table and hence this index is going to be useless
This must be master-detail implemented as a JSON field, that is complete nonsense!
I have seen many DB design mistakes, but I see something like this for the first time in my 20+ year career! This is full , complete, ultimate f@ck up !
Go running to redesign your DB!
What was your question BTW?
You can find everything here
https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html
First, when you answer, use “reply” command, by this the one you reply to can be notified.
Second, your question is unclear, you already have the query by which you already have got the field. So what you need is unclear
Ask a detailed questions, please
You must install MySQL client on that host, and then you will be able to connect
how is the space complexity of DFS bm+1? can you show me websites which have solved it?
i will share you 1 video.
Hello everyone, mysql introdution is my first youtube video uploaded in this channel. In this channel i will be uploading a series of video related mysql and…
What is DFS bm+1 ?
How MySQL is related to this?
I think it should be O(N), because you need to store path stack