drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arina Yelchiyeva <arina.yelchiy...@gmail.com>
Subject Re: Regarding Drill Select query
Date Tue, 17 Jan 2017 13:21:32 GMT
Issue you are describing is not connected with analytic function.
T3.Name is showing since blank since Drill couldn't find such column.
Please use case indicated in your table, for example, T3.`name` AS `Name`.

Kind regards
Arina

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

> 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
> value.
>
> 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`
=
> T2.`WebsiteID`;
>
> 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.
>

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