# SQL

**URL:** https://forum.codewithmosh.com/c/sql/10.md?page=3

[Latest](https://forum.codewithmosh.com/latest.md) · [Categories](https://forum.codewithmosh.com/categories.md)

**Page:** 4

---

## [Unable to insert CSV file in mysql](https://forum.codewithmosh.com/t/unable-to-insert-csv-file-in-mysql/23259)

<div class="topic-metadata">

**Author:** [@akhil1234](https://forum.codewithmosh.com/u/akhil1234)\
**Replies:** 0\
**Last updated:** [October 25, 2023, 6:26am UTC](https://forum.codewithmosh.com/t/unable-to-insert-csv-file-in-mysql/23259 "2023-10-25T06:26:46Z")

</div>

Hi, I tried to insert CSV file in MySQL but getting error. FYI, Table successfully created create table if not exists employees1 ( EmployeeID int, Name varchar(50) not null, Salary …

---

## [How can I speed up data import](https://forum.codewithmosh.com/t/how-can-i-speed-up-data-import/16946)

<div class="topic-metadata">

**Author:** [@nwfoxflyer](https://forum.codewithmosh.com/u/nwfoxflyer)\
**Replies:** 3\
**Last updated:** [October 16, 2023, 4:40am UTC](https://forum.codewithmosh.com/t/how-can-i-speed-up-data-import/16946 "2023-10-16T04:40:15Z")

</div>

Hello, I have been using MySQL Workbench in an attempt to import 5.5 million records from a CSV file into an empty table that has no indexes or foreign keys. When I run the procedure, the data loads, but it takes almost…

---

## [I loaded the databases and all however some of my tables seems it didn't load and it's showing Tables fetching. How can I fix this please?](https://forum.codewithmosh.com/t/i-loaded-the-databases-and-all-however-some-of-my-tables-seems-it-didnt-load-and-its-showing-tables-fetching-how-can-i-fix-this-please/22915)

<div class="topic-metadata">

**Author:** [@Roots](https://forum.codewithmosh.com/u/Roots)\
**Replies:** 2\
**Last updated:** [October 11, 2023, 4:41pm UTC](https://forum.codewithmosh.com/t/i-loaded-the-databases-and-all-however-some-of-my-tables-seems-it-didnt-load-and-its-showing-tables-fetching-how-can-i-fix-this-please/22915 "2023-10-11T16:41:42Z")

</div>

Hello, I hope this finds you well. I am on the getting started - Lesson 5 Creating the Databases. I loaded the databases and all as per Mosh steps however, some of the tables didn’t load or still refreshing mode and sh…

---

## [Output is not showing after running](https://forum.codewithmosh.com/t/output-is-not-showing-after-running/22620)

<div class="topic-metadata">

**Author:** [@akhil1234](https://forum.codewithmosh.com/u/akhil1234)\
**Replies:** 1\
**Last updated:** [September 20, 2023, 7:19am UTC](https://forum.codewithmosh.com/t/output-is-not-showing-after-running/22620 "2023-09-20T07:19:50Z")

</div>

Hi, When I run this query its showing successfully executed but i did not get output please suggested for this

---

## [How to find data for excercise](https://forum.codewithmosh.com/t/how-to-find-data-for-excercise/22550)

<div class="topic-metadata">

**Author:** [@akhil1234](https://forum.codewithmosh.com/u/akhil1234)\
**Replies:** 1\
**Last updated:** [September 16, 2023, 12:24pm UTC](https://forum.codewithmosh.com/t/how-to-find-data-for-excercise/22550 "2023-09-16T12:24:26Z")

</div>

Hi, I just start learning, Mosh given some excercise, I did not find data please support

---

## [SQL\_Course material is not compatible](https://forum.codewithmosh.com/t/sql-course-material-is-not-compatible/11322)

<div class="topic-metadata">

**Author:** [@patrickribbsaeter](https://forum.codewithmosh.com/u/patrickribbsaeter)\
**Replies:** 7\
**Last updated:** [September 13, 2023, 4:33pm UTC](https://forum.codewithmosh.com/t/sql-course-material-is-not-compatible/11322 "2023-09-13T16:33:07Z")

</div>

Hi, i just signed up today to the full course. Took me 2 min in to first course of SQL and I ran into issue directly… The course material is not updated or outdated. Whichever it is, the course material is not the same a…

---

## [No query results and no error messages](https://forum.codewithmosh.com/t/no-query-results-and-no-error-messages/22391)

<div class="topic-metadata">

**Author:** [@Chris0077](https://forum.codewithmosh.com/u/Chris0077)\
**Replies:** 2\
**Last updated:** [September 7, 2023, 9:32pm UTC](https://forum.codewithmosh.com/t/no-query-results-and-no-error-messages/22391 "2023-09-07T21:32:02Z")

</div>

Sometimes I try to run a query and get no results and no error messages, despite having copied the code from the video. Does this happen to anyone else or know why it happens?

---

## [Is SQL course up to date](https://forum.codewithmosh.com/t/is-sql-course-up-to-date/22329)

<div class="topic-metadata">

**Author:** [@Nikos](https://forum.codewithmosh.com/u/Nikos)\
**Replies:** 2\
**Last updated:** [September 4, 2023, 5:53pm UTC](https://forum.codewithmosh.com/t/is-sql-course-up-to-date/22329 "2023-09-04T17:53:51Z")

</div>

Hey, I am thinking to expand my knowledge by taking the SQL course. Is the Mosh SQL course up to date or SQL stays the same through the years? I was reading some comments about the Angular 4 course for example and peopl…

---

## [Aggregate functions not working](https://forum.codewithmosh.com/t/aggregate-functions-not-working/22203)

<div class="topic-metadata">

**Author:** [@ahlam](https://forum.codewithmosh.com/u/ahlam)\
**Replies:** 4\
**Last updated:** [August 26, 2023, 5:09pm UTC](https://forum.codewithmosh.com/t/aggregate-functions-not-working/22203 "2023-08-26T17:09:48Z")

</div>

Aggregates not functioning None of them turn blue. I checked to make sure there are no spaces, They are still grey with no function. Kindly help me

---

## [Please cover Window functions in the MySQL course](https://forum.codewithmosh.com/t/please-cover-window-functions-in-the-mysql-course/21932)

<div class="topic-metadata">

**Author:** [@Nav](https://forum.codewithmosh.com/u/Nav)\
**Replies:** 2\
**Last updated:** [August 9, 2023, 1:21pm UTC](https://forum.codewithmosh.com/t/please-cover-window-functions-in-the-mysql-course/21932 "2023-08-09T13:21:01Z")

</div>

Hi @Mosh @moshhamedani, Can you please cover the window functions in Mysql course? I am not able to find any topic related to window functions in the SQL course.

---

## [sql\_store.....Table fetching goig on forever](https://forum.codewithmosh.com/t/sql-store-table-fetching-goig-on-forever/21329)

<div class="topic-metadata">

**Author:** [@seantayyebi](https://forum.codewithmosh.com/u/seantayyebi)\
**Replies:** 2\
**Last updated:** [August 1, 2023, 9:02am UTC](https://forum.codewithmosh.com/t/sql-store-table-fetching-goig-on-forever/21329 "2023-08-01T09:02:28Z")

</div>

I am new and @ sql\_sore; Tabels fetching… going on for last 30 minutes; any suggestion greatly appreciated thx!

---

## [All rows not showing in SQL table output display](https://forum.codewithmosh.com/t/all-rows-not-showing-in-sql-table-output-display/21795)

<div class="topic-metadata">

**Author:** [@Nav](https://forum.codewithmosh.com/u/Nav)\
**Replies:** 3\
**Last updated:** [August 1, 2023, 4:59am UTC](https://forum.codewithmosh.com/t/all-rows-not-showing-in-sql-table-output-display/21795 "2023-08-01T04:59:04Z")

</div>

In my SQL database, I have a table with 16000 rows. But when I open that table in SQL it is showing only 1001 rows in the output display. But SELECT COUNT(\*) is returning 16000. Any reason why the remaining rows are not…

---

## [I am making a social media app should i choose SQL mastery course becuz i will use a ORM with node](https://forum.codewithmosh.com/t/i-am-making-a-social-media-app-should-i-choose-sql-mastery-course-becuz-i-will-use-a-orm-with-node/10317)

<div class="topic-metadata">

**Author:** [@karu](https://forum.codewithmosh.com/u/karu)\
**Replies:** 4\
**Last updated:** [July 25, 2023, 5:13pm UTC](https://forum.codewithmosh.com/t/i-am-making-a-social-media-app-should-i-choose-sql-mastery-course-becuz-i-will-use-a-orm-with-node/10317 "2023-07-25T17:13:11Z")

</div>

Should i choose SQL mastery course for my social media app? however i will be using ORM please reply as sooon as possible

---

## [Writing down SQL query on Linux Terminal](https://forum.codewithmosh.com/t/writing-down-sql-query-on-linux-terminal/21604)

<div class="topic-metadata">

**Author:** [@Junaid\_tariq](https://forum.codewithmosh.com/u/Junaid_tariq)\
**Replies:** 2\
**Last updated:** [July 22, 2023, 2:26am UTC](https://forum.codewithmosh.com/t/writing-down-sql-query-on-linux-terminal/21604 "2023-07-22T02:26:59Z")

</div>

I am using Linux user, so mainly use Linux terminal to run my SQL queries. If I made a mistake while writing a query in multiple lines, how to move to previous line? i.e., look at the figure attached, In which I made…

---

## [Create Table; Primary key and other keys not checked!](https://forum.codewithmosh.com/t/create-table-primary-key-and-other-keys-not-checked/21501)

<div class="topic-metadata">

**Author:** [@seantayyebi](https://forum.codewithmosh.com/u/seantayyebi)\
**Replies:** 0\
**Last updated:** [July 14, 2023, 9:18pm UTC](https://forum.codewithmosh.com/t/create-table-primary-key-and-other-keys-not-checked/21501 "2023-07-14T21:18:55Z")

</div>

Whe we do create table from existing one(s) what do we do with Primary key and other keys which are not “checked” thx!

---

## [Sql query questions](https://forum.codewithmosh.com/t/sql-query-questions/21462)

<div class="topic-metadata">

**Author:** [@puneet](https://forum.codewithmosh.com/u/puneet)\
**Replies:** 2\
**Last updated:** [July 12, 2023, 10:38pm UTC](https://forum.codewithmosh.com/t/sql-query-questions/21462 "2023-07-12T22:38:25Z")

</div>

select \*, quantity \* unit\_price as final from order\_items where order\_id = 6 and final \> 30 im not getting the desired output for the above query. is there any error?

---

## [Mastery SQL Course](https://forum.codewithmosh.com/t/mastery-sql-course/21437)

<div class="topic-metadata">

**Author:** [@Abdullah\_Maher](https://forum.codewithmosh.com/u/Abdullah_Maher)\
**Replies:** 0\
**Last updated:** [July 11, 2023, 10:53pm UTC](https://forum.codewithmosh.com/t/mastery-sql-course/21437 "2023-07-11T22:53:10Z")

</div>

Hello my friends I’m Abdullah i would ask is the first 3 hours in SQL course the same in the YouTube ? so if i watched the video in YouTube I should start from 4th hour from course

---

## [Why and How is EXISTS is faster than IN operator?](https://forum.codewithmosh.com/t/why-and-how-is-exists-is-faster-than-in-operator/21351)

<div class="topic-metadata">

**Author:** [@saisuryakat](https://forum.codewithmosh.com/u/saisuryakat)\
**Replies:** 0\
**Last updated:** [July 9, 2023, 3:54am UTC](https://forum.codewithmosh.com/t/why-and-how-is-exists-is-faster-than-in-operator/21351 "2023-07-09T03:54:52Z")

</div>

In Complete SQL Mastery course, Mosh explained that EXISTS executes faster than IN Operator. But my doubt is EXISTS is a correlated subquery which means the subquery executes for every row in the parent query until it m…

---

## [Connect MySQL Workbench](https://forum.codewithmosh.com/t/connect-mysql-workbench/21349)

<div class="topic-metadata">

**Author:** [@Ctran](https://forum.codewithmosh.com/u/Ctran)\
**Replies:** 3\
**Last updated:** [July 9, 2023, 3:37am UTC](https://forum.codewithmosh.com/t/connect-mysql-workbench/21349 "2023-07-09T03:37:12Z")

</div>

I’m trying to connect MySQL Workbench to MySQL data source but I’m not sure how to navigate through that.

---

## [MYSQL database missmatch](https://forum.codewithmosh.com/t/mysql-database-missmatch/21193)

<div class="topic-metadata">

**Author:** [@Denitsa](https://forum.codewithmosh.com/u/Denitsa)\
**Replies:** 2\
**Last updated:** [July 1, 2023, 5:54pm UTC](https://forum.codewithmosh.com/t/mysql-database-missmatch/21193 "2023-07-01T17:54:45Z")

</div>

Hi, I have noticed some mismatches between the results I am receiving and the solutions in the videos. Recently I have restored my database to it’s original state as advice by Mosh in order to continue my study. Currentl…

---

## [Mysql-8.0.33-macos13-x86\_64.dmg installer hangs/freezes](https://forum.codewithmosh.com/t/mysql-8-0-33-macos13-x86-64-dmg-installer-hangs-freezes/21080)

<div class="topic-metadata">

**Author:** [@jliu](https://forum.codewithmosh.com/u/jliu)\
**Replies:** 0\
**Last updated:** [June 26, 2023, 9:29am UTC](https://forum.codewithmosh.com/t/mysql-8-0-33-macos13-x86-64-dmg-installer-hangs-freezes/21080 "2023-06-26T09:29:13Z")

</div>

Hi all, I got a problem when installing MySQL on my laptop. When I installed the package ( macOS 13 (x86, 64-bit), DMG Archive): it got stuck at the installation step and wouldn’t progress. It never makes it to the Co…

---

## [COUNT(\*) is returning the wrong amount of rows?](https://forum.codewithmosh.com/t/count-is-returning-the-wrong-amount-of-rows/21055)

<div class="topic-metadata">

**Author:** [@Clayson](https://forum.codewithmosh.com/u/Clayson)\
**Replies:** 1\
**Last updated:** [June 24, 2023, 8:10pm UTC](https://forum.codewithmosh.com/t/count-is-returning-the-wrong-amount-of-rows/21055 "2023-06-24T20:10:23Z")

</div>

Hi everyone, I am on aggregate functions in MYSQL in the course, when Mosh introduces COUNT(\*), which is supposed to return the total amount of rows including ones with NULL, I have 19 rows and it is counting only 17 (Sh…

---

## [Having clause - output mismatches](https://forum.codewithmosh.com/t/having-clause-output-mismatches/3924)

<div class="topic-metadata">

**Author:** [@Shubham](https://forum.codewithmosh.com/u/Shubham)\
**Replies:** 7\
**Last updated:** [June 10, 2023, 5:23am UTC](https://forum.codewithmosh.com/t/having-clause-output-mismatches/3924 "2023-06-10T05:23:33Z")

</div>

Hello, Mosh. I have restored the databases after introductory topics. AND still, your and my outputs are not matching with exactly similar queries. I think in the ZIP file that you provided there is no entry for order\_id…

---

## [What is the point of Views?](https://forum.codewithmosh.com/t/what-is-the-point-of-views/20587)

<div class="topic-metadata">

**Author:** [@Rosalyta](https://forum.codewithmosh.com/u/Rosalyta)\
**Replies:** 2\
**Last updated:** [June 2, 2023, 8:49am UTC](https://forum.codewithmosh.com/t/what-is-the-point-of-views/20587 "2023-06-02T08:49:38Z")

</div>

Hi everyone! Bit of a weird question here, I’m not struggling with any code…but I don’t understand the point of Views in mySQL. I can understand that they are helpful for protecting the data in the original tables, but …

---

## [MIN MAX - Aggregate Functions not working](https://forum.codewithmosh.com/t/min-max-aggregate-functions-not-working/4666)

<div class="topic-metadata">

**Author:** [@SuperFlyTNT](https://forum.codewithmosh.com/u/SuperFlyTNT)\
**Replies:** 3\
**Last updated:** [May 30, 2023, 10:10pm UTC](https://forum.codewithmosh.com/t/min-max-aggregate-functions-not-working/4666 "2023-05-30T22:10:16Z")

</div>

Hi Folks, When writing this query I’m getting an error message when i use MAX and MIN, but the AVG works fine. If you look at the picture the ‘MIN’ and ‘MAX’ statements are not in bold in the query, but the AVG is. Any t…

---

## [I have enrolled but cannot get the zip file. where it is now?..can anyone share to me?](https://forum.codewithmosh.com/t/i-have-enrolled-but-cannot-get-the-zip-file-where-it-is-now-can-anyone-share-to-me/20466)

<div class="topic-metadata">

**Author:** [@5um17](https://forum.codewithmosh.com/u/5um17)\
**Replies:** 0\
**Last updated:** [May 25, 2023, 4:10pm UTC](https://forum.codewithmosh.com/t/i-have-enrolled-but-cannot-get-the-zip-file-where-it-is-now-can-anyone-share-to-me/20466 "2023-05-25T16:10:04Z")

</div>

I have enrolled but cannot get the zip file. where it is now?..can anyone share to me?

---

## [SQL zip to study is not working](https://forum.codewithmosh.com/t/sql-zip-to-study-is-not-working/17041)

<div class="topic-metadata">

**Author:** [@HANKAYA](https://forum.codewithmosh.com/u/HANKAYA)\
**Replies:** 5\
**Last updated:** [May 25, 2023, 12:38pm UTC](https://forum.codewithmosh.com/t/sql-zip-to-study-is-not-working/17041 "2023-05-25T12:38:02Z")

</div>

Hello the zip folder for SQL database is not working on windows What should I do?

---

## [Want to enroll in SQL course](https://forum.codewithmosh.com/t/want-to-enroll-in-sql-course/20391)

<div class="topic-metadata">

**Author:** [@adeelnaqvi172](https://forum.codewithmosh.com/u/adeelnaqvi172)\
**Replies:** 0\
**Last updated:** [May 22, 2023, 12:03pm UTC](https://forum.codewithmosh.com/t/want-to-enroll-in-sql-course/20391 "2023-05-22T12:03:38Z")

</div>

I am going to enroll in SQL course provided by Mosh. but before enrolling can anyone help me to give details regarding this course, how much i am able to write complex SQL queries? pleas givee me some details.

---

## [Table View in SQL Not Same as Mosh](https://forum.codewithmosh.com/t/table-view-in-sql-not-same-as-mosh/20327)

<div class="topic-metadata">

**Author:** [@midwave96](https://forum.codewithmosh.com/u/midwave96)\
**Replies:** 2\
**Last updated:** [May 21, 2023, 9:29am UTC](https://forum.codewithmosh.com/t/table-view-in-sql-not-same-as-mosh/20327 "2023-05-21T09:29:42Z")

</div>

Hello my Table view in the SQL Lesson titled “Column Attributes” looks WAY different than what Mosh is showing in his video. Do you know how I can get to the view Mosh is showing in the video? I’ve tried everything but i…

---

## [Trying to combine 2 queries](https://forum.codewithmosh.com/t/trying-to-combine-2-queries/20278)

<div class="topic-metadata">

**Author:** [@Erwin007](https://forum.codewithmosh.com/u/Erwin007)\
**Replies:** 0\
**Last updated:** [May 16, 2023, 2:48pm UTC](https://forum.codewithmosh.com/t/trying-to-combine-2-queries/20278 "2023-05-16T14:48:58Z")

</div>

I have 2 queries: Query1 = SELECT reps.rep\_name, sum(sales.sales\_totaldollars) as total FROM sales JOIN reps on reps.rep\_id = sales.sales\_repid AND reps.rep\_touroperator\_id = ‘5’ AND reps.rep\_active = 1 WHERE (sal…

[Previous page](https://forum.codewithmosh.com/c/sql/10.md?page=2)

[Next page](https://forum.codewithmosh.com/c/sql/10.md?page=4)
