Noob here. I am trying to create a class or data structure where each entry has one unique name and an unknown number of descriptive tags. I’d like the data structure to be something I could also easily export to some common format (I am guessing that CSV would not be able to do what I am asking since I
Tag: csv
Mysql subquery in where clause that returns comma separated value
I’m not really good at subqueries, here’s the sample tables that I have. table customers ===================== id | name | order_ids 1 | John | 1,2 table orders ===================== id | name 1 …
SQL Select Statement – Automation Anywhere
I am trying to write an SQL select statement where i only extract two columns from a csv which has been connected as a CSV. The select statement query i am using is: Which extracts all data in the table as expected, I wish to only extract data in columns with headers: The below line of code throws a syntax
Dropping the index column from DataFrame in a .csv file in Pandas
I have a python script here: and when I run it, it creates separate csv files that are formatted in sql. The output looks like this in generatedfile2: The rest of the files have this same format. Is there any way I can change my code to get rid of the “2” at the beginning of the code? It won’t
MySQL – select distinct values from a column where values are separated by comma
To get the list of distinct values from table1 and column1 is as easy as doing this: However, I inherited (unfortunately) a database where column1 contains values separated by a comma I need to get the list of distinct values from column1, so it looks like this: Any ideas? Answer A generic method uses a recursive query (available in MySQL
SQL function to generate new row per event?
I’ve looked for an answer here to no avail; wondering if this problem is best suited outside SQL environment but thought I’d see how it could be solved. I’m trying to look at web journeys and as a result need my data to be in the following format: At present the data is in the following format: I essentially want
postgres – aggregate items in text array
I have an array of text items, each text item in the array is a delimited string, here is a sample: drop table if exists tmp; create table tmp(x text); insert into tmp select (‘1~41.5~50~1|2~43.72~…
parse string containing comma in csv using mysql? (or maybe pandas?)
(I’m using mysql v5.7) I have a csv file that has something like mytable1 note that ‘aaa,bbb,ccc’ is one string and ‘8,3,5’ is one string.. I know it’s not a good practice putting data like this but this is what I have given from other department… so my first task was to extract number matched with ccc. like this: mytable2 for
Split value into multiple rows
The following are two tables I have in the database mavenmovies. testLocation (TABLE 1) CREATE TABLE mavenmovies.testLocation ( id INT AUTO_INCREMENT PRIMARY KEY, State varchar(255), name …
Hive throwing ParseException while exporting a csv
Running this code, I am trying to export a csv but I get the following error: ParseException line 2:3 cannot recognize input near ‘MIN’ ‘(‘ ‘HIGH’ in expression specification Answer Try to add table alias (d) and use select d.* instead of select *: