Search found 7 matches

by atul.pdm@gmail.com
Wed Feb 22, 2017 5:56 pm
Forum: New to Vertica SQL
Topic: How to use ERROR TOLERANCE parameter in Vertica SQL?
Replies: 1
Views: 228

How to use ERROR TOLERANCE parameter in Vertica SQL?

Hi, I am getting error "Duplicate key values violates constraint 'public.table_name.C_UNIQUE' " while uploading the data to vertica table. I need to use the ERROR TOLERANCE parameter in sql statement so that it treats each source during execution independently when loading dataThe invalid source is ...
by atul.pdm@gmail.com
Tue Nov 22, 2016 7:43 pm
Forum: New to Vertica SQL
Topic: how to use the datepart function to calculate the count at specific time?
Replies: 1
Views: 1736

how to use the datepart function to calculate the count at specific time?

I need to calculate the count of slots for each hour like 2016-01-01 00:00:00,2016-01-01 01:00:00,.......... I tried using below query but it did not worked,please suggest SELECT count(slots) FROM acctn WHERE (DATEPART(mm, start_time) = 00 AND (DATEPART(ss, start_time) = 00 output should be like: Da...
by atul.pdm@gmail.com
Mon Nov 21, 2016 2:38 pm
Forum: New to Vertica SQL
Topic: How to print the output of select query Horizontally?
Replies: 1
Views: 1073

How to print the output of select query Horizontally?

I need the output horizontally, union function gives the output in one column. I am using below query, do I need to use join?Please suggest SELECT min(TIMESTAMPDIFF('ss',submission_time,start_time))as Min_Wait_time from time union SELECT max(TIMESTAMPDIFF('ss',submission_time,start_time))as Max_Wait...
by atul.pdm@gmail.com
Fri Nov 18, 2016 1:31 pm
Forum: New to Vertica SQL
Topic: How to calculate the median
Replies: 1
Views: 727

How to calculate the median

I need median of the (TIMESTAMPDIFF('ss',submission_time,start_time) in below query.
My query giving the syntax error.please suggest

Code: Select all

SELECT count(job_number),median(TIMESTAMPDIFF('ss',submission_time,start_time)) as median from acctn;
by atul.pdm@gmail.com
Mon Nov 07, 2016 12:30 pm
Forum: Vertica SQL
Topic: ERROR: Subquery must return only one column
Replies: 4
Views: 2087

Re: ERROR: Subquery must return only one column

You are right but I need to calculate the sum of ru_wallclock and cpu for the one owner in single row but this output shows the multiple records for one owner. Is there a way to calculate the sum of all the values in columns ru_wallclock and cpu for the particular owner? but before this the calculat...
by atul.pdm@gmail.com
Thu Nov 03, 2016 6:34 pm
Forum: Vertica SQL
Topic: ERROR: Subquery must return only one column
Replies: 4
Views: 2087

Re: ERROR: Subquery must return only one column

Thanks for the reply.I need more help on this, How to use the distinct function with case statement with multiple conditions? Example: I am running below query to calculate the sum of cpu and ru_wallclock on the condition that the job_number should be distinct but it is not working,please suggest se...
by atul.pdm@gmail.com
Wed Oct 26, 2016 5:41 pm
Forum: Vertica SQL
Topic: ERROR: Subquery must return only one column
Replies: 4
Views: 2087

ERROR: Subquery must return only one column

I need to calculate the sum of wallclock and cpu based on the condition (slots > 1) from same table, but I am getting erorr "Subquery must return only one column" I tried below query: select owner, job_number,slots, (select sum(ru_wallclock) wallclock, sum(cpu) cpu from acctn where slots > 1) from a...

Go to advanced search