Hi Team, i've one offline table as below: ```id,...
# general
v
Hi Team, i've one offline table as below:
Copy code
id, name, position, timestamp
1,vishal,SDE1,
2,Raj, SDE2
1,vishal, SDE2
1,vishal,NULL
here i am try to featch data for id=1 so SQL query will be
SELECT position FROM table where id=1
it will return 3 records. but i want only one record which is
1,vishal,SDE2
. can we achieve through scalar function lets say we will pass id as arg and fetch all data in that function get write a logic which will merge the rows and return one string which is concat of all columns. EX.:
Copy code
SELECT data(1) FROM table;

def of data func(id) {
select all the data which has id=1 and merge those record and return one single string
}
is it possible? can we query inside the function? or we need to call api to query data inside the function?
@Kartik Khare any comment on this? thanks
m
Are name and position different columns? If so you just have to put more filters in the query on those columns
Or is it an MV column