I would like to calculate the time delay between several customer purchases. However, each purchase is saved in an individual row. The data set looks similar to the following: customer | order_id | …
What is the best way to pass in authenticated user information to a sql query?
My web application uses a table users, posts and votes, where a user can create a post and the votes table contains single votes made by some user on some post (think of Hackernews or Reddit). When …
Adding a dot in a string in sql
I need to add a dot in two strings of numbers. (example “88188741478”). I need to add it 8 characters before the end. The result should look like this “881.88741478”. I need …
Insert query returns error : SQL Error: ORA-01861: literal does not match format string
I have this simple enough insert query but i have no idea why it is returning an error. i can see the error comes from the row Birthay, if i remove it the insert is done ok. My query: INSERT INTO …
Hackerrank SQL problem to solve in Oracle’s SQL version
Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest …
Adding text and image to database with C# and SQL
The following windows form application takes an input for name, age, gender, description, and an image. However when clicking the “Save Information” button the following exception error …
Should the column used to order results be included in the index of a postgresql table?
I am creating indexes for a PostgreSQL database. I would like to know whether the column(s) used to order results in a PostgreSQL statement should be included in the index. Assume I have created a …
SQL : Keep ONE row with max value on a column depending on value of another column
It’s well documented on StackOverflow how to find the whole data for the row with some max value in a column per some group identifier (SQL select only rows with max value on a column). But that given …
SQL Pivot and get column row data
I have tables and data as below. Trying to get the Manufacturer and the questions they answered by joining and pivot but able to. Added the expected output at the end but no luck. Any suggestions are …
Oracle Apex update specific row of table
Hi i want to update a specific row of my oracle database via apex. So i need to reach/address the specific row via where clause. example entries: GATTUNG ART UNTERART ABART VARIETÄT AAA AAA AAA NULL …