Jump to content

tricky SQL questions please


Recommended Posts

Posted

and another is it always going to be 4 records in each set ? 

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

  • mettastar

    25

  • rakeshchinna

    9

  • former

    6

  • Srimantudu

    3

Popular Days

Top Posters In This Topic

Posted
2 minutes ago, mettastar said:

what is the relation vuncle.. question is not clear... 

24567898  ->12345668

 

how are these two related? 

first set lo first dhi second set lo first dhi ala relate chesava ?

pattern choosi think uncle oka column lo 8 rows unnayi 4 rows oka column lo kavali inko 4 rows inko column lo kavali 

Posted
Just now, rakeshchinna said:

pattern choosi think uncle oka column lo 8 rows unnayi 4 rows oka column lo kavali inko 4 rows inko column lo kavali 

i got that but , A-->B relation ela telusthadi.. can I get 4 rows from second set into B column in any random order ?

Posted
2 minutes ago, mettastar said:

i got that but , A-->B relation ela telusthadi.. can I get 4 rows from second set into B column in any random order ?

yes in any random order

Posted

with a as

select a, rank() over(partition by substring(a,1,1) order by a ) rnk from table

select a1.a, a2.a

from a a1 inner join a a2 on a1.rnk=a2.rnk and substring(a2.a='1') and substring(a1.a='2')

 

any other best/simple solution for this

 

Posted
6 minutes ago, Spartan said:

MSSQL DB ni MYSQL lo ki convert chese script veyi.

@mettastar

conversion ante alochinchali not on top of my head.. jai google thalli

Posted
2 minutes ago, mettastar said:

with a as

select a, rank() over(partition by substring(a,1,1) order by a ) rnk from table

select a1.a, a2.a

from a a1 inner join a a2 on a1.rnk=a2.rnk and substring(a2.a='1') and substring(a1.a='2')

 

any other best/simple solution for this

 

@rakeshchinna

Posted
Just now, k2s said:

Learn USQL man... azure sql DW lo use setharu

ey sql aina ade concept kada thatha... questions emanna adugu 

Posted
44 minutes ago, mettastar said:

I want now.. meru general ga interview lo face chesina questions or meru interview chesetapudu adige questions veyandi

Join on the Null Value? How to handle null values in the join ?

Posted
Just now, Srimantudu said:

Resetting Identity column on a table.

Truncate Table 

Posted
1 minute ago, former said:

Join on the Null Value? How to handle null values in the join ?

Nulls meda join avadhu .. so NVL use chesi convert null to some default to join

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...