I have the following table: Rows Decimals First 1.1.1.3.2 Second 16.1.1.1.89.1 Third 3.1.1.1.177.2 Fourth 1.1.1.1.178.3 I only want to return the rows where the second to last decimal is between 0.7 to 0.94 (inclusive), but all the other numbers can contain any value. For the above table, this would be only the second row. How can I specify my query
Tag: mysql-workbench
Lost connection to MySQL server during query error when I try to use function
I am trying to make a function which checks if any date between say Date-range A and B lies between the Date-range C and D. Whenever I try running the function MySQL Workbench always throws an Error Code:2013 Lost connection to MySQL Server during query. I am assuming this error is arising due to the loop running forever (please correct
Mysql JSON_OBJECT aggregate json objects to json array where id matches
As mentioned in the title, i’ve been trying to aggregate json objects to a json array where the id is the same. I’ve got a main table “kurs” that has a unique id and is connected to the table “kompetenz” over a link table. For each “kurs” there can be multiple “kompetenzen”. However after a few hours of trying i
SQL query optimization for speed
So I was working on the problem of optimizing the following query I have already optimized this to the fullest from my side can this be further optimized? Answer Your query although joined ok, is an overall bloat. You are using the dim_ad_type table on the outside, just to make sure it exists on the inside as well. You have
Re: MySQL 8.0 Command Line Client Error 1205
MySQL 8.0 Command Line Client is giving me a timeout error and I have restarting the transaction by typing “start transaction” another time. Keep in mind that I have another command line open with the table CIA_DATA.new_table and it is also being updated with the same changes. (I am doing this to follow a tutorial.) Here is the script: Updated
MySQL Foreign Key ERROR. Constraint key error
I can’t add a foreign key to an existing table. The error is as follows Answer I’ve written the schema below which is working. I advise against using the same name student_id for the constraint as already used for the column. I would prefer fk_student_id to avoid risk of an ambiguity or conflict at some point. ✓ ✓ ✓ ✓
mysql return people with similar purchase and desc order by count of similar items
customers table id name 1 a 2 b 3 c 4 d purchase table product_id customer_id x 1 y 1 x 4 y 4 x 3 z 2 the customer table has customer data and purchase table has order data. Now coming to question, I want customers id who bought similar products ordered by the count of similar items eg:
how to single out certain names in sql
So I have this problem in SQL where the question is this: List the sId and name of students that applied to “WSU” But not “U of O”. and my attempt was this: However this does not do the trick as it doesn’t catch that some of the students had already applied to U of O. MRE: And then of
Generate DDL script for MySQL in Oracle SQL Developer
I made a relational model in Oracle SQL Developer and I want to make tables in MySQL Workbench. I generated the DDL script in SQL Developer and copied it in MySQL Workbench. I found out that the copied queries are not in correct syntax. I tried different options in SQL Developer to generate script and none of them were in
How to find the Employee names and their supervisor names if the table doesn’t have common numeric column like Employee_id or employee number in Mysql
If the table have only two columns with employee name and their supervisor column and if it doesn’t have any other numeric or number column with employee_number or employee_id, then how the results can be produced. I’m not getting logic to show the results. Code for creating table in Mysql: It’s output is: The result should be in the lower