Database Star
Database Star
  • Видео 205
  • Просмотров 5 088 507
HARD Leetcode SQL Problem Solved (#262)
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/?
🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/?
This Leetcode problem, #262, is rated as Hard on Leetcode's list of problems.
In this video, you'll learn what the problem is about, what we need to answer with our query, and the step-by-step process to follow to get to an accepted answer.
You'll learn different approaches to getting different parts of the query as well.
Leetcode problem 262: leetcode.com/problems/trips-and-users/description/
⏱ TIMESTAMPS:
00:00 - Question
01:23 - Expected results
02:56 - Group the data
03:47 - Cancelled trips
06:55 - Cancellation rate
08:04 - Banned users
10:31 -...
Просмотров: 274

Видео

SQL Medium Leetcode Problem Solved (#177)
Просмотров 47215 часов назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? This is a medium-level SQL question on Leetcode. In this video, you'll learn what this problem is (Find the Nth Highest Salary), and how to solve it using SQL. You'll also see how to fix the runtime errors often found in this solution, and h...
How to Export a Database to SQL in DBeaver
Просмотров 27520 часов назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? If you're using DBeaver, you may want to export a database to an SQL file. You can then use this SQL file to import again at a later date, or to load onto a different computer or database, or for backups or version control. In this video, yo...
What is SQL HAVING and Why Use It?
Просмотров 537День назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? The SQL HAVING keyword is very helpful in certain situations. In this video, you'll learn what the SQL HAVING keyword is, why you need it, and how to use it.
Movie Theatre Database Design: Step-by-Step
Просмотров 1,9 тыс.14 дней назад
📝 Bonus PDF: This ERD, descriptions of each table and column with sample data, and SQL scripts to create all of the tables on your own database: www.databasestar.com/dbdesign/? 🎓 Learn how to design an effective database and create it using SQL: databasestar.mykajabi.com/edd/? A movie theatre or movie booking website seems like a simple concept, but there is a lot of structure behind the scenes...
DBeaver Data Import: How to Import a CSV
Просмотров 40614 дней назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? You can import a CSV file into a database using DBeaver. In this video, I'll show you where to find the menu option in DBeaver, how it's different for Postgres and MySQL, and step through the process to import a CSV file into the database.
Stop Complex SQL Date Logic and Use This Instead
Просмотров 90921 день назад
📝 Get the SQL scripts from this video: www.databasestar.com/calendar-scripts/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? If you need to view different parts of a date field, you'll find your logic gets complicated pretty quickly. There's a better solution though. In this video, I'll explain the problem, show you the solution, and how to write the SQL to sol...
DBeaver and GitHub Tutorial: Version Control Your Code
Просмотров 46321 день назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? DBeaver has built-in functionality for working with a Git repository, making it easy to version control your SQL code and other files. In this video, you'll learn how to link your GitHub repository to your DBeaver editor, pull files from Git...
SQL Leetcode Problem Solved (Leetcode 183)
Просмотров 57628 дней назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? Leetcode has a great range of practice database and SQL questions. In this video, I'll explain one of these practice questions, and demonstrate three different ways that it can be solved, along with some common issues that you'll find along ...
ENUM vs Check Constraint vs Lookup Table: Which Is Better?
Просмотров 801Месяц назад
📝 Bonus PDF: This ERD, descriptions of each table and column with sample data, and SQL scripts to create all of the tables on your own database: www.databasestar.com/dbdesign/? 🎓 Learn how to design an effective database and create it using SQL: databasestar.mykajabi.com/edd/? There are a few ways you can restrict the values in a particular column. In this video, I'll demonstrate the different ...
3 Ways to Rank Your SQL Results (And When To Use Each)
Просмотров 467Месяц назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? In SQL, there are three ways to rank your SQL results, which means giving each row a numerical value in an order based on some value. In this video, I'll explain the three ways you can do it, and why to choose each ranking method. ⏱ TIMESTAM...
How to Install Oracle on Windows (in 2024)
Просмотров 463Месяц назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? The recent release of Oracle database has meant that the installation process for Windows is different. So, if you want to install Oracle on Windows, this is the video for you. In this video, you'll learn: - how to download the required soft...
How to Install Oracle on an M1/M2 Mac (Finally)
Просмотров 3,2 тыс.Месяц назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? You can finally get an Oracle database running on an M1 Mac! In this video, I'll explain step-by-step how to set up an Oracle database on an M1, M2, or M3 Mac. This will include using Docker to start the database, and connecting to it using ...
Data Analyst Project: Step-by-Step Analysis with SQL
Просмотров 2,4 тыс.Месяц назад
📝 Get this Data Analysis Project Guide: www.databasestar.com/project-guides/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? If you want to improve your SQL, you'll need to practice your skills. A great way to do this is to download a sample data set and run some SQL on it. In this video, you will learn how to: - download a sample CSV data set - import this CSV ...
SQL Aggregate Functions: What You Need to Know
Просмотров 589Месяц назад
📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-cheat-sheets/? 🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql-simplified/? Aggregate functions in SQL are powerful and quite popular. In this video, you'll learn what aggregate functions are, see examples of the five functions available, learn how to filter results, how to group results, and how to apply filters to...
How to Join 3 or More Tables in SQL
Просмотров 1,1 тыс.Месяц назад
How to Join 3 or More Tables in SQL
Stop Doing This With Your SQL
Просмотров 2,4 тыс.3 месяца назад
Stop Doing This With Your SQL
How to Understand the SSMS Execution Plan
Просмотров 1,8 тыс.3 месяца назад
How to Understand the SSMS Execution Plan
8 Tips for pgAdmin (To Save You Time)
Просмотров 1,2 тыс.4 месяца назад
8 Tips for pgAdmin (To Save You Time)
eCommerce Product Database Design: Step-By-Step
Просмотров 13 тыс.4 месяца назад
eCommerce Product Database Design: Step-By-Step
This Is Why You Should Care About SQL Performance
Просмотров 1,1 тыс.4 месяца назад
This Is Why You Should Care About SQL Performance
How to Understand the pgAdmin Execution Plan
Просмотров 1,1 тыс.4 месяца назад
How to Understand the pgAdmin Execution Plan
Find Time for Learning With This 10-Minute Task
Просмотров 1 тыс.5 месяцев назад
Find Time for Learning With This 10-Minute Task
Stop Making This Database Mistake with Decimal Values
Просмотров 1,3 тыс.5 месяцев назад
Stop Making This Database Mistake with Decimal Values
SQL Developer in VS Code Tutorial (2024)
Просмотров 7 тыс.5 месяцев назад
SQL Developer in VS Code Tutorial (2024)
Understand This Feature To Write Faster MySQL Queries
Просмотров 9895 месяцев назад
Understand This Feature To Write Faster MySQL Queries
How to Design a Database for AirBNB
Просмотров 4,2 тыс.5 месяцев назад
How to Design a Database for AirBNB
How to Export to CSV in MySQL Workbench
Просмотров 8925 месяцев назад
How to Export to CSV in MySQL Workbench
This Is Why People Put WHERE 1=1 In Their SQL
Просмотров 4,8 тыс.6 месяцев назад
This Is Why People Put WHERE 1=1 In Their SQL
I Critique a Database Design: My Honest Review
Просмотров 2 тыс.6 месяцев назад
I Critique a Database Design: My Honest Review

Комментарии

  • @shadinvp1211
    @shadinvp1211 10 часов назад

    How to create a user in this database ? It showing error when using this command “CONN USER user_name IDENTIFIED BY mypassword “after connecting database

  • @AnurudhSingh-u8k
    @AnurudhSingh-u8k 16 часов назад

    Lovely!

  • @andriifadieiev9757
    @andriifadieiev9757 16 часов назад

    Amazing explanation!

  • @JulianaRibeiro-lz7ju
    @JulianaRibeiro-lz7ju 2 дня назад

    Clear and concise instructions. Thank you!

  • @ramiworkstation
    @ramiworkstation 2 дня назад

    This lesson is as sweet as Sugar. 🍬🍬Thank you for sharing

  • @airaharune8108
    @airaharune8108 2 дня назад

    like new_app....how do i set my database

    • @DatabaseStar
      @DatabaseStar День назад

      It depends on your vendor, but you could use the USE command.

  • @IrfanRafiq-os3ed
    @IrfanRafiq-os3ed 2 дня назад

    please share some queries to get data from this library database

  • @zinder5444
    @zinder5444 3 дня назад

    Great Job .

  • @suat6282
    @suat6282 3 дня назад

    Installation on MacBooks is a problem in itself, thanks for sharing.

  • @Gr33dyTaRdO
    @Gr33dyTaRdO 3 дня назад

    I really appreciate the time you took to make this video. It's beautifully explained and has a great amount of information! If I could, I would like to ask something in regards to the shopping cart and orders. Say a user is signed in and he adds a few products to the shopping cart - now those products will be saved to the database and added to the shopping_cart as I understand. Then when the user decides to checkout those products, will they be copied to the shop_order table through order_line? Or is it that when the user adds products to the shopping_cart, those products should get added to order_line directly too?

    • @DatabaseStar
      @DatabaseStar День назад

      Thanks! I'm glad you like the video. Good question. I think it's the first scenario: they will be copied to the shop order table. However, another comment suggested that they are kind of the same thing so the shopping cart table could be removed and perhaps an order is just created. Hope that helps.

  • @diamondsandlipgloss
    @diamondsandlipgloss 5 дней назад

    this really helped me learn about CTEs, so thank you very much!!! Now I just need to learn what "recursive" means and find your video on hierarchical queries.

    • @DatabaseStar
      @DatabaseStar 3 дня назад

      Glad it was helpful! I can make a video about recursive in the future.

  • @X4Xubi
    @X4Xubi 5 дней назад

    Brother the script U provided in Ur GitHub repository has possible errors, I ran it in MySQL workbench but it failed saying "Error Code: 1824. Failed to open the referenced table 'attribute_type' ". Can U plx fix this ASAP as I have to practice queries on some meaningful data. Plx provide the correct script to create this database or guide me if I made a mistake.

    • @DatabaseStar
      @DatabaseStar 3 дня назад

      Hi Xubi, as mentioned over email, the script has not been updated. The issue was caused by the tables not being created in the correct order.

  • @TimL_
    @TimL_ 5 дней назад

    Brilliant, thanks! It is convenient that offset returns null if there are not enough rows. One correction: you need to select distinct salary values, otherwise some test cases will fail.

    • @DatabaseStar
      @DatabaseStar 3 дня назад

      That's a good point. The script had passed the existing test cases, but yes if there was different data then we may need to find the distinct values.

  • @carthai4590
    @carthai4590 6 дней назад

    i'm a fan of yours

  • @factzfactory4956
    @factzfactory4956 6 дней назад

    Thankyou for this wonderful explanation Lot of my doubts automatically got solved as I kept listening your explanation

  • @carthai4590
    @carthai4590 6 дней назад

    this guy is really good help me a lot in database design

  • @mkm130402
    @mkm130402 6 дней назад

    awesome, i need to run apex on cloud, can you make a video to learn this topic?

    • @DatabaseStar
      @DatabaseStar День назад

      I can but I’ll have to research it as I have never worked on Apex.

  • @balb4903
    @balb4903 6 дней назад

    Great video your solution to the problem is amazingly well explained

    • @DatabaseStar
      @DatabaseStar День назад

      Thanks! I’m glad you liked it.

  • @someuser4166
    @someuser4166 6 дней назад

    Thank you. I used to use mysqlYog but moved over to Linux and thus needed something new, this was very helpful. I haven't watched the full video yet but I hope this program has the ability to export your databases as sql quarries for backups 🤔 Also a bit of a side note but do you know of any reputable mysql clients on Android? Nothing fancy, I just want to be able to quickly review the information when I'm out and about. 🤔

    • @DatabaseStar
      @DatabaseStar День назад

      Glad you liked it. Yes I believe it can export to both formats. I don’t know any clients for android as I’ve never used sql on an android

  • @olaoluwaadeosun2942
    @olaoluwaadeosun2942 6 дней назад

    Bunch of thanks

  • @MuhammadFahreza
    @MuhammadFahreza 7 дней назад

    What is temp table ? does it mean View Table ?

    • @DatabaseStar
      @DatabaseStar День назад

      It’s a table you can create to store data that you can refer to later. It’s like a view but it stores data and only exists for the duration of your session.

  • @BM-zb9lz
    @BM-zb9lz 8 дней назад

    Thank you for your lessons with wonderful voice. Looking forward to part 4

  • @user-ll5qj9tj5c
    @user-ll5qj9tj5c 8 дней назад

    first time it was connected but lator when i open again vs code and try to connect it shows error

  • @carthai4590
    @carthai4590 9 дней назад

    you're the best

  • @carthai4590
    @carthai4590 9 дней назад

    really good thanks for everything

  • @AminTeymuriAzar
    @AminTeymuriAzar 9 дней назад

    what is Tible?! its a Table! not so hard and its Paper not Piper

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      What do you mean? I say Table and Paper.

  • @machocorpse6929
    @machocorpse6929 10 дней назад

    Why is my select not capitalized, how can I fix this?

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      There's a setting in DBeaver: Go to Preferences > General > Editors > SQL Editor > SQL Formatting. Then under Auto Format there is a box for Convert Keyword Case.

    • @machocorpse6929
      @machocorpse6929 8 дней назад

      @@DatabaseStar thanks

  • @redwansikder3847
    @redwansikder3847 10 дней назад

    It removed my confusion about volume and bind mount.

  • @redwansikder3847
    @redwansikder3847 11 дней назад

    Nice explanation. 🙂

  • @MOHAMEDMAHMOUD-zr9ds
    @MOHAMEDMAHMOUD-zr9ds 11 дней назад

    I Liked you tutorial, but how website for this database work? & I'm beginner

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      Thanks! That's like asking how web development works, so I would suggest watching a video on that which can be helpful.

  • @diamondsandlipgloss
    @diamondsandlipgloss 11 дней назад

    1:18 why do we need the parenthesis around the asterisk in the SELECT FROM statement?

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      Good question. It's because the word COUNT is a function, and functions need to have brackets at the end of the name so they can run. Inside the brackets for functions, we specify parameters, such as values or columns to be processed by the function. The COUNT function can count columns: for example, COUNT(first_name) counts the number of first_name values that are not NULL. The asterisk is a different parameter to the COUNT function, and it means "count the entire row". So, COUNT(*) means count the entire row. Hope that answers your question.

  • @krosYT
    @krosYT 12 дней назад

    Great!

  • @passportbro904
    @passportbro904 12 дней назад

    bra, i took one of ur udemy courses on databases and it was the best course i ever did but i could never find you to see if you had anymore courses, now im learning sql 1 year later and i find you. destiny or what lol, this teacher is a master.

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      Thanks for the kind words! Yeah I'm still here on RUclips and my website!

  • @kateelfridaodeh
    @kateelfridaodeh 13 дней назад

    Thanks for this video

  • @bamideleifeoluwajoshua3642
    @bamideleifeoluwajoshua3642 13 дней назад

    it actually worked at first but couldnt go into my root where i have the schemas....i just lost a data😭😭😭😭😭😭😭😭😭😭.have been try to sign in to my localhost

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      You should be able to sign into the main account still

  • @athak23
    @athak23 13 дней назад

    what if it doesnt connect?

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      You can try in another editor or resolve the connection issue, which depends on your database vendor and the error message.

  • @AndreMantas
    @AndreMantas 13 дней назад

    Not everything you see in a website has to be in a table. For example the status for a movie could be a calculated value based on the date of the first and last showing. Otherwise you need to have a cron job somewhere checking this and updating the movie status. Another thing I wonder is how the website will know how to render the theater structure and exactly where to put the seat icons just from the seat location. Sounds like a cool challenge Besides that I think the explanation makes sense and was well presented 👍

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      Great point! Yes, the status could be calculated as you suggested. Good question about the theatre structure. One way to do this is to set up some kind of grid concept for seats, and each seat can have an X and Y reference.

  • @matze489
    @matze489 13 дней назад

    really good video

  • @khadijakennou8064
    @khadijakennou8064 13 дней назад

    thaaaaaaaaanks

  • @MBinDenver
    @MBinDenver 14 дней назад

    Thank you for this! Extremely easy given your tutorial...

  • @charlsroy5830
    @charlsroy5830 14 дней назад

    Great video, helpful. Thank you :)

  • @user-ll5qj9tj5c
    @user-ll5qj9tj5c 14 дней назад

    why i cant find my table which i created earlier whenever i close vs code

    • @DatabaseStar
      @DatabaseStar 13 дней назад

      I'm not sure, it should be there even if you close VS Code. Are you on the same connection?

  • @thomasleclech2917
    @thomasleclech2917 15 дней назад

    Thank you! :)

  • @Dean-LongSol
    @Dean-LongSol 15 дней назад

    Awesome and to the point. Thanks for taking the time to record this video.

  • @fernandoluna3866
    @fernandoluna3866 15 дней назад

    Hi, my question is more towards VS Code and VS Code Server. I have VS Code installed and had no problem adding the SQL Developer extension. However, this doesn't seem to be available for the Server version of VS Code (which I am hosting in my home lab). Any thoughts on why this is or if there is a work-around to getting it installed?

    • @DatabaseStar
      @DatabaseStar 13 дней назад

      Oh I've never heard of a server version of VS Code. I'm not sure how to get it installed unfortunately.

  • @Im_Ashwin.M
    @Im_Ashwin.M 15 дней назад

    Very helpful videos. Can you make video about airline PNR database. A PNR can have 1. passenger name (first name, last name, title) 2. flight details (airlineCode, flight number, startCity, endCity, startTime, endTime) 3. phone (cityCode, number) 4. email 5. remarks 6. Special service requests (requestCode, status, remark)

  • @user-yg5oz2pq1u
    @user-yg5oz2pq1u 15 дней назад

    I personally really like your clarification of what the candidate key actually is and how it differs from the primary key. That was great help, thank you! Liked and Subscribed! 🤘

    • @DatabaseStar
      @DatabaseStar 13 дней назад

      Thanks! Glad it was helpful.

  • @danishali5198
    @danishali5198 15 дней назад

    can you do for a financial System like a complex one

    • @DatabaseStar
      @DatabaseStar 13 дней назад

      What do you mean by a financial system?

    • @danishali5198
      @danishali5198 13 дней назад

      @@DatabaseStar I mean like a banking system.

  • @danishali5198
    @danishali5198 15 дней назад

    i love your videos

  • @OsteenOmega
    @OsteenOmega 15 дней назад

    Thank you so much for this content. can we have a session where you give a set of requirements and allow us to come up with our designs and then release your solution in a future video and see how we were to the actual design. i believe this way your content will be more interactive for us follow up

    • @DatabaseStar
      @DatabaseStar 9 дней назад

      That's a good idea! I'll look at creating something like that.