I have two database tables. First table: | ID | Sub-Name | Marks | 01 | french | 50 | 01 | russian | 50 | 02 | french | 30 | 02 | russian
I want to select only one row from a table. This row holds the maximum number in the table. I have tried to use MAX Fun but it didn't work for me. I use two ta
I'm trying to average a set of columns and exclude rows with zero from the denominator by using a case statement within an AVG() function. I read that avg() exc
What I currently have is: UPDATE card, records IF(records.date_returned == null) THEN SET card.last_seen = records.date_loaned ELSE SET card.last_seen = records
I was hoping you could help me figure this out. I would like to run a query that would search a table and all it's rows and the date matches the current month.
In a 2-player game using PostgreSQL 9.6.6 as backend I have defined the following custom stored function for retrieving chat messages for a user: CREATE OR REP
I am using PREPARE statement in store procedure but it is taking much time at the time of records insertion. Please suggest me the replacement for PREPARE state
I am working in grafana with MySQL. I have a template variable and it has multiple values and I want to use that template variable with MySQL query using 'like'
I'm creating a database for all the Magic the Gathering cards... The card table looks like this: cardID name text rarityID colorID editionID other colu
I would like to know how to read a csv file using sql. I would like to use group by and join other csv files together. How would i go about this in python. exa
I have a table table_categories (id INT(11), cname VARCHAR(25),survey_id INT(11)) I want to retrieve the values for the column cname without duplication, that
I am dynamically forming MySQL statements in PHP and can't figure out why this one is failing to execute: INSERT INTO users ( `email`, `pa
I have a table with 60 boolean (TINYINT(1)) searcheable columns. User has possibility of using any subset of the given columns as search condition. Based on tha
I have one requirement START_DATE : 03/01/2018 END_DATE : 31/01/2018 I need a query which will list all the weeks starting date and end date between these two
I have three tables. Estimates, Estimate_versions, and customers. Here is some SQL SELECT estimates.id, estimates.estimate_number, estimates.description, est
How can I customize CAST (TimeStamp TO STRING) format in Firebird? cast (<DateField> as VarChar(25)) It does not work as I want. I do as I wish with t
In an Oracle database there's a big PL/SQL procedure being executed periodically that copies data from one DB to another one through a database link and it is f
Is it possible to use the OR operand when comparing two boolean values? Using MYSQL 5+ Ex. ON DUPLICATE KEY UPDATE table1.3_InMarket = (table1.3_InMarket OR
I have just started with Python and am already aware of the basics of SQL. In this code I'm trying to join tables and just test out python however I have two pr
I have a large excel worksheet that I want to add to my database. Can I generate an SQL insert script from this excel worksheet?