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.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
14 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 ...
1 vote
0 answers
5 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 ...
  • 11
1 vote
1 answer
4k 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 ...
1 vote
0 answers
26 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 ...
1 vote
0 answers
211 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 ...
1 vote
0 answers
733 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. ...
0 votes
1 answer
16 views

How do I get a big-picture feel for my database?

Background: I was just granted access to my company's SQL Server (MS SQL 2019 via Azure Data Studio). As I have not yet been assigned any specific projects I want start digging. I've asked my DBA to ...
0 votes
0 answers
15 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 ...
0 votes
1 answer
18 views

Missing statement in the below MYSQL query

I have 3 tables with columns likes- ...
0 votes
0 answers
19 views

Get the average wait time for successful sessions & unsuccessful sessions using SQL

RISE On Demand is a call center application on Microsoft Teams. Customers can initiate online meetings through the company’s website where they can connect with agents to resolve their queries/issues....
0 votes
0 answers
11 views

Power BI: Selecting a column based on a value in another table

In a database, there are two tables... examples as follows: table_1: CAGDP9_1 CAGDP9_2 ##### ##### linecode_description_table: linecode description CAGDP9_1 desc here Suppose I am searching for ...
  • 1
0 votes
0 answers
25 views

Equivalent of Presto's 'histogram' function in Azure SQL

I want to get an equivalent function to Presto's 'histogram' which just aggregates counts into a histogram like json, e.g if I have a table called table that looks ...
0 votes
1 answer
64 views

Python-SQL-Excel : When to use them?

I am currently learning data science and learned already a lot of Python not just for data science, also for script writing, web scraping etc. Meanwhile i started to look for how people actually earn ...
0 votes
0 answers
12 views

How do you publish the direct returned dataset from a SQL server stored procedure inside Power BI instead of using that dataset to populate a report?

I have a sql server stored procedure that return a dataset with very specific ORDER BY parameters. I can import that dataset into Power BI properly, but when I go to create a report using that dataset,...
0 votes
0 answers
14 views

SQL Code for Azure ML Studio

I have a csv file named 'bikebuyers' in which there is only one sheet named 'bibus'. In this sheet, there are 19 columns and 1001 rows. The last column is my dependent variable named 'Purchased Bike' ...
  • 1
0 votes
0 answers
652 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 ...
  • 26
0 votes
0 answers
158 views

Computing number of business days between start/end columns

I have two Dataframes facts: columns: data, start_date and end_date holidays: column: <...
  • 101
0 votes
0 answers
38 views

Has anyone joined FHIR resources?

I have FHIR-formatted data (Fast Healthcare Interoperability Resources), that I've converted to CSV using the npm package ndjson-to-csv, and on first glance, this seems useable for ML experimentation, ...
0 votes
1 answer
26 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 ...
0 votes
0 answers
61 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 ...
  • 101
0 votes
0 answers
188 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 ...
0 votes
1 answer
49 views

Creating a complex featureset for regression modeling

I am currently working a on project that requires me to convert all of the categorical variables to continuous (or binary) variables to build a regression model. The problem is that I have more than ...
  • 21
0 votes
0 answers
74 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 ...
0 votes
1 answer
332 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 : ...
  • 53
-1 votes
1 answer
459 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 ...
  • 1