**Contents:**

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?

**marko2202**

*2020-10-08 20:21:41*

*What means key word distinct in SQL?*

*2020-10-08 20:26:53*

**piterden**

*2020-10-07 19:08:05*

telegram grps related to artificial intelligence

*2020-10-08 20:26:59*

**marko2202**

*2020-10-08 20:21:41*

What means key word distinct in SQL?

go to sqlbolt.com and learn it

*2020-10-08 20:27:05*

*2020-10-08 20:27:13*

**piterden**

*2020-10-08 23:45:26*

**marko2202**

*2020-10-08 20:21:41*

What means key word distinct in SQL?

It means to get unique records

**piterden**

*2020-10-08 23:46:34*

**piterden**

*2020-10-08 23:45:26*

Or maybe it’d be better to say not repeat

**MasterZiv**

*2020-10-09 00:35:57*

*2020-10-08 20:27:13*

No, distinct is not used with aggregate functions

**alexsandro_matias**

*2020-10-09 01:16:46*

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;

**alexsandro_matias**

*2020-10-09 01:17:04*

**piterden**

*2020-10-09 02:39:07*

**alexsandro_matias**

*2020-10-09 01:16:46*

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?

**alexsandro_matias**

*2020-10-09 02:46:49*

**piterden**

*2020-10-09 02:50:50*

**alexsandro_matias**

*2020-10-09 02:46:49*

What about?

**alexsandro_matias**

*2020-10-09 02:51:17*

**piterden**

*2020-10-09 02:52:09*

**drfibonacci**

*2020-10-09 06:13:56*

**alexsandro_matias**

*2020-10-09 01:16:46*

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

**drfibonacci**

*2020-10-09 06:14:57*

**drfibonacci**

*2020-10-09 06:16:13*

**drfibonacci**

*2020-10-09 06:17:11*

**jacob_joelin**

*2020-10-09 07:11:02*

**jacob_joelin**

*2020-10-09 07:11:30*

**MasterZiv**

*2020-10-09 07:32:36*

**alexsandro_matias**

*2020-10-09 01:16:46*

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?*

**MasterZiv**

*2020-10-09 07:35:03*

**jacob_joelin**

*2020-10-09 07:11:30*

This is a json field.

Should not be used actually

**MasterZiv**

*2020-10-09 07:39:08*

**alexsandro_matias**

*2020-10-09 01:16:46*

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

**MasterZiv**

*2020-10-09 09:07:39*

**jacob_joelin**

*2020-10-09 07:11:30*

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!

**MasterZiv**

*2020-10-09 09:09:38*

**jacob_joelin**

*2020-10-09 07:11:30*

*What was your question BTW?*

**jacob_joelin**

*2020-10-09 09:14:06*

**drfibonacci**

*2020-10-09 09:15:25*

**jacob_joelin**

*2020-10-09 07:11:30*

You can find everything here

https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html

**MasterZiv**

*2020-10-09 09:25:44*

**jacob_joelin**

*2020-10-09 09:14:06*

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

*2020-10-09 11:02:02*

*2020-10-09 12:07:51*

**MasterZiv**

*2020-10-09 14:04:45*

*2020-10-09 11:02:02*

Ask a detailed questions, please

**iamshameer**

*2020-10-09 17:27:30*

**iamshameer**

*2020-10-09 17:27:58*

**iamshameer**

*2020-10-09 17:28:28*

**iamshameer**

*2020-10-09 17:28:46*

*Can any one tell me how to acess ?*

**MasterZiv**

*2020-10-09 17:41:02*

**iamshameer**

*2020-10-09 17:28:46*

You must install MySQL client on that host, and then you will be able to connect

*2020-10-10 14:44:00*

**MasterZiv**

*2020-10-09 14:04:45*

how is the space complexity of DFS bm+1? can you show me websites which have solved it?

*2020-10-10 14:44:16*

**iamshameer**

*2020-10-09 17:27:58*

i will share you 1 video.

*2020-10-10 14:45:12*

**MYSQL introduction | Learn how to install and run MySQL in system**– YouTube

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…

*2020-10-10 14:45:17*

**MasterZiv**

*2020-10-10 16:22:36*

*2020-10-10 14:44:00*

What is DFS bm+1 ?

*2020-10-10 16:22:56*

*2020-10-10 16:22:57*

**MasterZiv**

*2020-10-10 16:23:18*

*2020-10-10 16:22:56*

*How MySQL is related to this?*

*2020-10-10 16:23:29*

*any algorithms groups in telegram?*

**MasterZiv**

*2020-10-10 16:24:18*

*2020-10-10 16:22:56*

I think it should be O(N), because you need to store path stack

*2020-10-10 16:24:38*

**MasterZiv**

*2020-10-11 09:24:41*

*2020-10-11 10:00:44*