Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [sql]

Structured Query Language (SQL) is a language for querying databases. Questions should include code examples, table structure, sample data, and a tag for the DBMS implementation (e.g. MySQL, PostgreSQL, Oracle, MS SQL Server, IBM DB2, etc.) being used.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
43 views

Designing a data science workflow for a small company

I work at a company with eight employees, and was recently hired as a data/business analyst. The company uses an in-house software to manage online retail sales. There is a huge amount of data ...
Kelsey's user avatar
  • 11
1 vote
0 answers
42 views

Moving a Neural Network to the SQL in R

tl;dr How do I use something like the tidypredict tool to move a neural network either textbook mlp, or deep, to SQL code? Background: This is an example that shows how to convert a linear model to ...
EngrStudent's user avatar
1 vote
0 answers
7 views

Hive Bring Table to Local Driver for Fast Debugging on CLI

I have a large Hive table on HDFS. Every time I query it, it runs a map reduce job which is slow. For debugging my code on CLI, I want a fast query. Is it possible to sample rows of the table and ...
solora's user avatar
  • 11
1 vote
1 answer
5k views

Passing tuples (key, value) into parameterized SQL query in Python

NOTE: I am new to this community, so please let me know if I can help you help me! I built a scraper in python that creates a tuple of (key, value). I would like to pass both key and value as ...
WackyTaco636's user avatar
1 vote
0 answers
31 views

Are there decisive leaders in programming with tabular data?

What are the most effective bread-and-butter in-memory open source tabular data frameworks today? I have been working with tabular data for years with an in-house solution that integrates with Excel ...
Monolithguy's user avatar
1 vote
0 answers
247 views

Self Union All in Tableau Public for Sankey Diagram

I'm following this 2017 YouTube tutorial from which I hope to learn Sankey diagrams. At 2:28, he instructs us to select Convert to Custom SQL, after having opened ...
Jonathan Rolfsen's user avatar
1 vote
0 answers
1k views

Calculating correlation and covariance in MySQL

I am new to data science taking my first course in Data analysis. I am trying to figure out where to start with a problem solving the correlation and covariance with my sql. ...
Chris Kehl's user avatar
0 votes
0 answers
16 views

how to eal with a column name having comma space or and

I am taking the Coursera assignments on SQL and came across to a question where one of the tables has a column with this name: Elementary, Middle, or High School I do not know how to deal with this ...
Baghban's user avatar
  • 101
0 votes
1 answer
12 views

lookup tables with multiple (possibly partly empty key columns) - prefer specific match over general one

Assume I have a table with samples: ID sample type origin project_l1 project_l2 project_l3 ... 1 DNA Blood p1 p1.1 p1.1.1 p1... 2 DNA Blood p1 p1.1 p1.1.2 p1... 3 DNA Blood p1 p1.1 4 DNA Blood p1 ...
jf1's user avatar
  • 101
0 votes
0 answers
13 views

What is system prompt in fine tuning of GPT3.5 for natural language to sql queries

What exactly is a system prompt while finetuning GPT3.5 or a language model in general? How can I build system prompt for the task of converting natural language to SQL queries
heyula's user avatar
  • 37
0 votes
1 answer
29 views

Customer Lifetime expectancy

I'm trying to compute Customer Lifetime Expectancy based on a table of subscriptions, that have 3 columns : user_id, user_subscription_start, user_subscription_end ...
ed WSA's user avatar
  • 1
0 votes
1 answer
20 views

Hassle-free platform for a small data science team?

our team of 4 data scientists has been exploring options to automate our ETL, data storage and model updates and are looking for a hassle-free platform that can help with this. We've had several ...
Rotten_Cabbagges's user avatar
0 votes
0 answers
207 views

How to get a SQL sequence value with sqlalchemy?

I would like to use a SELECT NEXT VALUE FOR to get a value from a sequence in Microsoft SQL Server. It does not look like I can simply use ...
Thomas Arildsen's user avatar
0 votes
0 answers
17 views

Formal terminology: metafeatures then groupby (GROUP BY) operation

In ML training and other analytics I often combine features to produce a 'metafeature' and then perform a 'groupby' (pandas) or 'GROUP BY' (SQL) query. What is the technical term for this operation? ...
M__'s user avatar
  • 206
0 votes
1 answer
23 views

How to programmatically manipulate SQL strings

As part of a hubby project I am working on, I need to be able to take SQL strings supplied by users, and then run it. But before running it, i will like to do some manipulations to the SQL. For ...
dade's user avatar
  • 101
0 votes
1 answer
30 views

Reduce dimension (Words) for recommender

I have made a related document finder natively in SQL Server. Currently I use the word as dimensions. Based on that i calculate the cosinus simularty to figure out related article. At the moment the ...
ozz's user avatar
  • 1
0 votes
0 answers
118 views

When using sqldf for join in python, is there a format to be followed for column names inside sql query?

I'm trying to use sqldf to do a left join on python. Here's my code: ...
Deep_S's user avatar
  • 1
0 votes
1 answer
59 views

Why does PowerBI take longer to load data than PowerQuery takes to load preview?

I have a stored procedure in SQL Server and when I open PowerQuery, I can get a preview of the whole table in a minute or two. But once I click 'Apply and Close', it will take AGES to load and finally ...
PowerBIUser's user avatar
0 votes
1 answer
51 views

Missing statement in the below MYSQL query

I have 3 tables with columns likes- ...
Abhishek's user avatar
  • 1,969
0 votes
0 answers
1k views

How to read a table from MySQL work bench in colab

I have referred to various articles on Stack Overflow and external sources but somehow am unable to get answer for this. I would like to read a table from MySQL workbench database into a dataframe in ...
Sabrin's user avatar
  • 36
0 votes
1 answer
31 views

How to strategize model training with new data coming in every day?

I have a mysql database in which new records are added every day to raw data. This raw data is cleaned and a ML model is trained with it once a week. What should be the best strategy to capture new ...
dodo postman's user avatar
0 votes
0 answers
104 views

Using MySQL Common Table Expressions to solve the travelling salesman problem

The problem I'm trying to solve is very similar to the travelling salesman problem, where there are many paths between nodes in the database. I've tried to edit my example to fit into this well-known ...
Greg's user avatar
  • 101
0 votes
0 answers
338 views

Best way to store large amounts of time series data? Relational database (SQL) or NoSQL route. Also additional python/pandas question inside

so I'm working on a project and I'm sort of stuck as to how to store my data. I have a concept I want to propose but am unsure whether it is possible, if it is not I would appreciate any help ...
user1884295's user avatar
0 votes
0 answers
122 views

Load data from SQL for Machine Learning

I have an SQL DB which has millions of records(10 years of data) and wanted to implement some ML Models. Most of the courses/tutorials explains using a local file or downloaded CSV. But in my case I ...
Sai Chandra's user avatar
0 votes
1 answer
478 views

Running a query in R after establishing dbconnect

I do not seem to figure out what is wrong it the following statement. The connection to the DWH is established but the query statement in R seems not to work, with the following error : ...
ColRow's user avatar
  • 53
-1 votes
1 answer
554 views

Tableau: How to change multiple field names

From SQL server I imported multiple tables that each have multiple fields. Unfortunately the field names are not that descriptive (data is originally from SAP) but I have a separate Excel file that ...
ZeiH's user avatar
  • 1