drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiv Kumar <sanjiv...@gmail.com>
Subject Re: Regarding Drill Select query
Date Tue, 17 Jan 2017 12:42:21 GMT
Hello Arina

              Thanks for reply. I have tried over() it working fine with
single table, but when i used join then the other table column showing null

See This Example:-
                            SELECT (CAST(T2.`ID` AS BIGINT)) AS `No of
Order`,T2.WebsiteID,count(*) over() FROM
<pluginName>.<dbName>.<schemaName>.<tableName1> AS T2;

This Working fine.

But If i used Join..

See This Example:-

                           SELECT (CAST(T2.`ID` AS BIGINT)) AS `No of
Order`,T2.WebsiteID,T3.`Name` AS `Name`,count(*) over() FROM
<pluginName>.<dbName>.<schemaName>.<tableName1> AS T2 INNER JOIN
<pluginName>.<dbName>.<schemaName>.<tableName2> AS T3 ON T3.`ID` =

In this query T3.Name from Table2 showing  blank.

On Tue, Jan 17, 2017 at 5:06 PM, Sanjiv Kumar <sanjivktr@gmail.com> wrote:

> Hello
>         I want to know.. Can i get all column name and column count in
> single select statement??
> Example:-
>                   I have table having total 10 rows and Id, Name, Salary
> Column.
> Now, Can i write single query to get all th column name (Id, Name, Salary)
> and total count of rows(i.e:- 10) ?
> ex:-   select T1.Id, T1.Name, T1.Salary, Count(*) from
> <pluginName>.<schemaName>.<tableName>
> Can anyone tell the solution.??
> --
> Thanks & Regards.
> Sanjiv Kumar.

Thanks & Regards.
Sanjiv Kumar.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message