Skip to content

How to get calculated data from one column in database

im new in sql. I cannot get data with format what i want in one step. Now i’m using more sql commands. I want to get all data in one command because i cant to connect them in subquery with group by. Somebodys can help me? example of Table i have: id order_id order_status 1 1 0 2 1 0

Percentage based on another column, with group by

This is what I have: getting this one: I want to have additional column, telling me per day how much is my success rate. E.g. 210/(210+40) for day 5, 40/(32+40) for day 6 etc: Answer This way you can get the rates (success/failure) for equivalent status type. Output:

Why can’t I create a view with a visual interface?

When the narrator in the video I watched on the Internet creates a view, he adds tables to the view with a visual interface as in the 1st picture, and sets the relations between the tables. But when I create a view, a code screen greets me and I need to create a view with code. Why can’t I create

How to update table in pl/sql?

Example contrived for this question. Two tables, Project and Employee. Employee has a project id foreign key. Query needs to select all the projects that are of year 2021 with ongoing status in Employee table for each record from above select statement (1), create a new row in project table and set year to 20…

ERREUR : Unknown column ‘Accessoires’ in ‘where clause’

My query is throwing up this error while i have column Accessoires in table categorie Can anyone see why? I FIXED IT LIKE THIS: Answer Using bound parameters with a prepared statement likely fixes your bug and also solves the severe security issue. The likely reason your code has failed is that test was &#822…