vertica Questions

4

Solved

have a table in vertica: test like this: ID | name 1 | AA 2 | AB 2 | AC 3 | AD 3 | AE 3 | AF how could I use an aggregate function or how to write a query to get data like this (vertica syntax)?...
Salutary asked 23/9, 2016 at 19:16

4

Solved

I need to get a comma separated list of ids as a field for a messy third party api :s This is a simplified version of what I am trying to achieve. | id | name | |====|======| | 01 | greg | | 02 |...
Jaimie asked 10/1, 2014 at 20:6

3

I am trying to get a list of users, who submitted a specific event in a website, however when I run the query, I am not getting the full result set - for example, I found 2 users who had the event ...
Bromism asked 14/3, 2018 at 14:34

3

Solved

According to this SQL join cheat-sheet, a left outer join on one column is the following : SELECT * FROM a LEFT JOIN b ON a.foo = b.foo WHERE b.foo IS NULL I'm wondering what it would loo...
Tendon asked 13/10, 2016 at 8:20

6

Solved

I want to pass a list of int's (comma separated) which is a field in my table ie. 1234, 2345, 3456, 4567 to my IN clause in WHERE. But the list is a string (VARCHAR), and I'm comparing to an i...
Katiakatie asked 21/7, 2015 at 7:19

4

I am transitioning from SQL Server to Vertica. Is there any comparable way to create a variable? Usually I do something like: Define @myVariable int Set @myVariable = select MAX(Field1) from myTa...
Krol asked 10/6, 2013 at 23:58

6

Vertica allows duplicates to be inserted into the tables. I can view those using the 'analyze_constraints' function. How to delete duplicate rows from Vertica tables?
Blade asked 19/6, 2013 at 20:0

2

I have a table S with time series data like this: key day delta For a given key, it's possible but unlikely that days will be missing. I'd like to construct a cumulative column from the delta v...
Hukill asked 5/8, 2011 at 1:8

1

I try to append my vertica (SQL-type) table through pandas using sqlalchemy import pandas as pd import sqlalchemy as sa Create engine to vertica: def get_engine(base): engine = sa.create_engin...
Pettit asked 18/5, 2017 at 9:2

3

Solved

I have a vertica database and I need to describe some tables. In MySQL you use describe table_name. And I know that in vertica it's \d table_name. Also I need to do it throw python, but when I make...
Oneself asked 16/10, 2014 at 7:50

2

Solved

I searched the Vertica documentation for the keywords Version and Version Number. But I couldn't really get any mention of SQL query to select the version of Vertica installed. I thought there wo...
Stovepipe asked 21/6, 2013 at 15:58

1

Solved

Suppose you have columns ID | A | B | C 1 | 3 | 1 | 2 2 | 5 | 9 | 1 3 | 1 | 2 | 3 and you want the columns concatenated such that the end result would look like ID | ABC_value_DESC | ABC_value...
Salmonberry asked 26/4, 2019 at 10:58

4

I am using a table that looks like this: userID, eventDate, eventName 1 2019-01-01 buySoup 2 2019-01-01 buyEggs 2 2019-01-03 buyMilk 2 2019-01-04 buyMilk 3 2019-01-02 buyBread 3 2019-01-03 buyBrea...
Moreen asked 25/2, 2019 at 21:18

2

Solved

I'm using DataGrip and I'm kind of new in it. There is a case for me to connect to Vertica DB. As far as I know, there is no native provided driver for connection to that type of databases. What st...
Harbard asked 17/10, 2016 at 7:58

1

Solved

I had DB Vertica 8.0. Create schema WAREHOUSE with table include field by type LONG VARCHAR. Now I tried to execude SELECT for example SELECT * FROM WAREHOUSE.ALL_EVENTS a WHERE a.original_data ...
Fluoroscope asked 20/10, 2017 at 18:52

1

I was getting a divide by 0 error with this code: CASE WHEN DENOMINATOR >= 0 THEN SUM(INT1 * INT2 / DENOMINATOR) ELSE 0 END AS RATIO However when I changed to the following code, it worked. ...
Favouritism asked 10/10, 2017 at 15:31

2

Solved

Is there any way I can store the last iterated row result and use that for next row iteration? For example I have a table say(Time_Table). __ Key type timeStamp 1 ) 1 B 2015-06-28 09:00:00 2 ) ...
Fulgurant asked 4/5, 2016 at 6:50

4

Could someone explain me the concept of PROJECTION in vertica database with an example query?
Aimeeaimil asked 18/4, 2012 at 14:41

1

Solved

So I have a Hadoop cluster with three nodes. Vertica is co-located on cluster. There are Parquet files (partitioned by Hive) on HDFS. My goal is to query those files using Vertica. Right now what ...
Mika asked 5/5, 2017 at 15:11

3

I`m working with Vertica. I try to export data from SELECT query into csv. I tried making it with sql query: SELECT * FROM table_name INTO OUTFILE '/tmp/fileName.csv' FIELDS TERMINATED BY ',' ENCL...
Na asked 21/10, 2014 at 7:28

5

We're looking to set up a user in our Vertica database that can see certain system tables, (projections, projection_storage and views), but we don't want this user to be a dbadmin, because we don't...
Settera asked 29/2, 2012 at 16:28

5

Solved

I have the following table: +--------+-------+------+--+ | Object | Event | Time | | +--------+-------+------+--+ | Obj1 | A | 1 | | | Obj1 | B | 3 | | | Obj2 | A | 7 | | | Obj2 | B | 4 | | +-----...
Muzzleloader asked 30/9, 2016 at 6:34

2

Solved

Consider a simple group by query: select foo, count(*) from mytable where bar=10 group by foo This returns a table that has the following form: foo | count ----+------ a | 100 b | 200 c | 300...
Contortionist asked 23/8, 2016 at 6:18

2

I use python and vertica-python library to COPY data to Vertica DB connection = vertica_python.connect(**conn_info) vsql_cur = connection.cursor() with open("/tmp/vertica-test-insert", "rb") as f...
Bring asked 14/11, 2015 at 16:32

2

Solved

Familiar question, but with Vertica. I'd like to return the top 5 geo_country rows based on sum(imps) for each tag_id. This is the query I started: SELECT tag_id, geo_country, SUM(imps) AS imps,...
Indoors asked 9/12, 2013 at 20:3

© 2022 - 2024 — McMap. All rights reserved.