Skip to content
Advertisement

Tag: amazon-redshift

Want decimal result Amazon Redshift

I am trying to calculate the average ice creams a kid will have during summer. I want the result to have 2 decimals. Query: The result I get is something like 1.0003. I only want 2 decimal points. Any suggestions? Answer You can do this with round

Invalid Object Name – Tried a few things

I have the following query: It keeps telling me ‘invalid object name’. The table exists. I checked the drop-down to ensure the right database is connected. I refreshed Intellisense cache. Not sure what else to do… Answer I think you are looking for linked server object names, if so then you need to call it : So, after then SELECT

installing h3 python library on AWS Redshift for usage in an UDF

I was trying to install the python library from ubers H3 as a custom library for aws redshift by using this for the installation. I followed the process and created the following function: When executing it with: I receive the following error: OSError: /rdsdbdata/user_lib/0/0/1334190.zip/h3/out/libh3.so.1: cannot open shared object file: Not a directory Tried the same with installing h3cy on redshift

Extract date part from timestamptz

I am trying to extract the hour from a timestamp with a timezone. However, my times are coming up incorrectly. Here’s an example, I am using Dbeaver with my timezone set to EST: SELECT ‘2020-01-24 …

Redshift – Missing latest date when join two tables

I have two tables (Calling as A and B table); Table – A data only includes the last 1 month data. Table – B data stores all data that you have. I need to find the difference between these two tables dates, but when I left joined the two tables I have null dates: I am going to use last_value

Redshift Rounding Off Issue

I have a table which has a numeric(23,2) field that I need to divide to a constant. My baseline is this aggregation select site, sum(sales) / 1.07 as sales from sales group by site; But when I add …

Advertisement