I’m writing an application to record 10 pin bowling game results. I’ve done the submission bit but I’m stuck on displaying the results. Here is the structure: In the example above I am assuming each person played 3 games, however any number of games could be played. How can I get the data in…
Tag: mysql
SQL Query “like” operator error, when the field is null
this query returns 421 records: Now when I implement the “like” operator, it returns 349 records, it is not taking into account the records with the field “invoice_number” in null:
Where can I find MySQL Path/URL for NetBeans?
I’m trying to do school JAVA EE project and I have to connect schema made in mysql from MYSql. part of code is (for SQL select) : and i apperently have no URL somehow Any ideas on that? I’m new to SQL and JAVA EE so i face lots of problems :/ Answer First of all you need a running
getting first sunday using the window function
I need to get the first Sunday from each month and add that as a new column to the original table. The below query works only when the first row of a group starts with Sunday i.e for March month. It doesn’t work when the month is not starting with Sunday. Query: Incorrect result How can this be solved u…
How can I use the MySQL COUNT() statement on a generated query?
I’ve created a query that finds the users of a specific site that have liked every photo on the site and stand out as potential bots. I’m trying to count the number of bots. My query currently …
Constraints using If structure
I got a data table and require some custom constraints. The data table is as following: ID int Val_1 int Val_2 int Val_3 int What i need is the following: If (Val_1 == A) { Val_2 cant be …
Multiple rows in left join causing duplicate data
I have a rather complex MySQL query designed to retrieve teams and their league performance – from the following tables: teams +——————+——————+——+—–+———+———-…
MySQL group by week interval on Linux timestamps starting from Sunday
I have a table of users that have joined and the column that tracked the timestamp of when they joined is a UNIX timestamp. I want to group them by a weeks time in seconds, 604800, but am running into a roadblock. The other searches use MySQL week, but that is not what I am after since those weeks are
Always round set seconds / minutes /hours to 00 mysql
In my database I have the following date-times: I want to be able to retrieve these records with the hours, minutes or seconds set to their 00 values: For example I want to be able to return records with seconds and milliseconds set to 00: Or return them setting the minutes to zero as well. How can I write a
How to correctly execute this promise based SQL Query?
I’m using MySQL2 to connect my Node.js app with a MySQL Database. Unfortunately trying to perform some promise based prepared statements I just can’t get a proper function setup that either returns successfully after entering the record or to throw an error whenever something goes wrong. Any ideas…