The Problem: In a ML based scenario, I am trying to see the occurrence of data from multiple columns in an Inference file versus the files that were provided to me for Training. I need this to be found only for categorical variables, since numerical attributes are scaled. The Expectation: I’ve got some …
How to Return paper title and number of authors for each paper using sql
I try to return paper title and number of authors for each paper,names of authors who have at least two papers and List names of authors who have co-authored with Dr. Chen. but i don’t find any way. Author Editor Paper Paper_author ) paper_review Reviewer Sample Inputs Author Editor Paper paper_author p…
Creating new data table on existing one
Hello I’ve got a question, how (if it possible), I can create new datatables with close same rows but if In column value is in string “/” for example ID column_param column_sym column_value …
Is it possible to do a several calculations in partition by statement in SQL?
I want to do the following calculation in SQL Microsoft server, As I understand all variables are aggregated by partition by the statement, however, I got an error Incorrect syntax. How can I solve the problem? Data is following and the output should be as in output column Answer Each window function needs an…
How to query for the difference between the sequences of two columns, from differing tables
I need a query that will compare the sequences of two columns (from two different tables) and display the first differing result. Summary with details follow: Operating out of a PostgreSQL server and using DBeaver Two tables with identical column headers. One entry (creq_id) will have 36 sequences (seq). When…
how to convert this sql query to liquibase query
I have table like this I need to delete all duplicated rows with equals A nad B value and lower C value after running sql script i need to have only this row with top C Value for every equals A and B columns this is the sql query i am using how to convert it to liquibase query Answer
Boolean value not being changed in database
Hey folks I’m having a problem with my code. For some reason when I try to change the value to false, it doesn’t reflect in my SQL Database. I debugged and it does get set via Java, but it doesn’t transfer over. I’m working on a notification service class and it sets the values on ther…
Combining Data from Multiple Rows in Simple Database
I am new to using SQL. I have constructed the following simple database, which has the ID of music albums and the number of copies bought. In the album_ID column, there are two pieces of data with ID 1. They have quantity_bought values of 10 and 4. Is it possible to combine these two rows into one row which h…
How to extract values from array json column into multiple rows in Postgresql?
How can I extract values from the json arrays in ranges column as multiple rows Postgresq? Expected result: Start End 1 100 101 1000 1001 2000 2001 2002 Answer You can use jsonb_to_recordset function for this : http://www.sqlfiddle.com/#!17/22d62/10
sql: query to find max count with extra columns as well
Input table:events GOAL I want max(distinct user) grouped by month column. my final result need two columns one is month and another one is max_count I need output similar to this I followed some approach Approach1: if i follow this approach, it is just giving me only max_count but i need month column as well…