# data[].attributes.body
https://andrewmoles2.github.io/r-pre-sessional/

# data[].attributes.body
https://pyprojects.streamlit.app/

# data[].attributes.body
https://andrewmoles2.github.io/DSL-R-Website/

# data[].attributes.body
https://mwiemers.github.io/stata_home.html

# data[].attributes.body
https://andrewmoles2.github.io/Introduction-to-LaTeX/

# data[].attributes.body
https://andrewmoles2.github.io/Report-Writing-Markdown/

# data[].attributes.body
https://lsecloud.sharepoint.com/:f:/r/sites/TEAM_Digital-Skills-Lab/Shared%20Documents/Generative%20AI/Copilot%20Workshop?csf=1&web=1&e=2A2zxm

# data[].attributes.body
https://pypresessionals.streamlit.app/

# data[].attributes.body
https://pymathps.streamlit.app/

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.attachment_link.description
saqibsafdar11 has 24 repositories available. Follow their code on GitHub.

# data[].attributes.body
Team:vp86r6x

# data[].attributes.body
Team: srkruvy

# data[].attributes.body
41kmhup

# data[].attributes.attachment_link.readable_text
import os
import time
import pygame
import keyboard
import platform
from csv import reader


def get_user_input():
    for key in "qdsa":
        if keyboard.is_pressed(key):
            return key

def play_song(song_x_info):
    song_x_file_name = f"{song_x_info[0]} - {song_x_info[-3]}.mp3"
    song_x_file_path = f"songs/{song_x_file_name}"
    pygame.mixer.music.load(song_x_file_path)
    pygame.mixer.music.play()


def create_app_string(song_info):
    artist = song_info[song_fields.index("artist")]
    title = song_info[song_fields.index("title")]
    duration = song_info[song_fields.index("duration")]
    total_sec_played = pygame.mixer.music.get_pos() // 1000
    min_played = total_sec_played // 60
    sec_played = total_sec_played - min_played * 60
    return f"""
SOUNDFREE

{artist[:12]:<15} - {title[:17]:<20}    {str(min_played).zfill(2)}:{str(sec_played).zfill(2)} / {duration}


CONTROLS
d: next song
a: previous song
s: pause song
q: quit app
"""

def clear_lines(num_lines):
    for _ in range(num_lines):
        print("\033[F\033[K", end='')


# load song info
with open("song_info/song_info_clean.csv") as f:
    song_info = list(reader(f))
    song_fields = song_info[0]
    song_info = song_info[1:]

print(song_fields)

pygame.mixer.init()

i = 0
paused = False
play_song(song_info[i])
app_string = create_app_string(song_info[i])
os.system("cls")
print(app_string)

while True:
    new_app_string = create_app_string(song_info[i])
    if new_app_string != app_string:
        app_string = new_app_string
        clear_lines(len(app_string.split('\n')))
        print(app_string)
    user_input = get_user_input()
    if user_input:
        if user_input != "q":
            if user_input == "s":
                if paused:
                    pygame.mixer.music.unpause()
                    paused = False
                else:
                    pygame.mixer.music.pause()
                    paused = True
            else:
                if user_input == "d":
                    if i < len(song_info) - 1:
                        i += 1
                    else:
                        i = 0
                elif user_input == "a":
                    if i > 0:
                        i -= 1
                    else:
                        i = len(song_info) - 1
                play_song(song_info[i])
            time.sleep(0.3)
        else:
            break


pygame.mixer.music.stop()
os.system("cls")

# data[].attributes.attachment_link.title
GitHub - andrewmoles2/rTrainIntroduction: Series of short introduction to R training courses, built for online delivery with RMarkdown and RStudio

# data[].attributes.attachment_link.description
Series of short introduction to R training courses, built for online delivery with RMarkdown and RStudio - andrewmoles2/rTrainIntroduction

# data[].attributes.headline
SQL Study Guide 1: Selecting Columns and Filtering Rows

# data[].attributes.subject
SQL Study Guide 1: Selecting Columns and Filtering Rows

# data[].attributes.body
📚 Learning Objectives Overview

Determine when to use databases vs spreadsheets

Extract data subsets by selecting specific columns

Filter rows based on conditions using WHERE clauses

Combine multiple conditions with AND/OR operators

Use the IN operator for multiple value matching

🧠 Key Concepts Summary

1. Basic SELECT Syntax

SELECT column1, column2, column3
FROM database.table;

Purpose: Extract specific columns from a table

Key Point: List column names separated by commas

Pro Tip: Use SELECT * to select ALL columns

2. WHERE Clause for Filtering

SELECT *
FROM database.table
WHERE condition;

Purpose: Filter rows based on specific conditions

Operators: <, >, =, <=, >=, !=

Key Point: WHERE comes after FROM

3. Combining Conditions with AND/OR

WHERE condition1 AND condition2  -- Both must be true
WHERE condition1 OR condition2   -- Either can be true

AND: Narrows results (more restrictive)

OR: Broadens results (less restrictive)

Pro Tip: Use parentheses for complex conditions

4. IN Operator for Multiple Values

WHERE column IN ('value1', 'value2', 'value3')

Purpose: Check if value matches ANY in the list

Better than: Multiple OR statements

Remember: Values in parentheses, separated by commas

5. SQL vs Spreadsheets Advantages

1. Capacity: Handles larger datasets

2. Performance: Faster processing

3. Security: Better data protection

4. Integration: Works with other software

🎯 Memory Aids & Mnemonics

SFWO - SQL Query Order

SELECT → FROM → WHERE → Order matters!

Filter Operators Cheat Sheet

< Less than (Left pointing = Less)

> Greater than (Right pointing = gReater)

= Exactly equals (single = for SQL)

AND = All conditions (AND = All)

OR = Optional conditions (OR = Optional)

IN Operator Memory Trick

"IN the club" - checking if someone is IN a list of members

💪 Practice Questions

Level 1: Basic SELECT

1. Write a query to select only the price column from flights.Flights

2. Select all columns from the flights table

3. Select d_from, d_to, and distance columns

Level 2: Simple WHERE

4. Find all flights with price greater than 250

5. Find all flights departing from 'Chicago'

6. Find all flights with distance less than 1000

Level 3: AND/OR Combinations

7. Find flights from Detroit with price under 150

8. Find flights to New York OR Los Angeles

9. Find flights from Chicago to Los Angeles with price under 200

Level 4: Complex Queries

10. Find all flights from Detroit OR Chicago with price between 100 and 200

11. Use IN to find flights going to Tokyo, Sydney, or Honolulu

12. Select specific columns for flights from Los Angeles to multiple Asian destinations

✅ Quick Reference Card

Essential SQL Keywords

SELECT: Choose columns

FROM: Specify table

WHERE: Filter rows

AND: Both conditions

OR: Either condition

IN: Match list values

Common Patterns

-- Pattern 1: Select specific columns
SELECT col1, col2 FROM table;

-- Pattern 2: Filter with single condition
SELECT * FROM table WHERE col = 'value';

-- Pattern 3: Multiple conditions
SELECT * FROM table WHERE col1 = 'A' AND col2 < 100;

-- Pattern 4: Either/or conditions
SELECT * FROM table WHERE col = 'A' OR col = 'B';

-- Pattern 5: Match multiple values
SELECT * FROM table WHERE col IN ('A', 'B', 'C');

🔄 Review Exercises

Scenario-Based Problems

Budget Traveler A client has $175 to spend and wants to fly from Detroit. Write a query to find suitable flights.

Flexible Destination A Chicago resident wants to visit either Miami, Orlando, or Atlanta. Show flight number, destination, and price.

Multi-City Search Find all flights under $200 departing from New York, Boston, or Philadelphia.

📝 Common Mistakes to Avoid

1. Forgetting semicolon at end of query

2. Wrong quote types - use single quotes for text values

3. Missing WHERE keyword before conditions

4. Incorrect AND/OR logic - use parentheses for clarity

5. Case sensitivity - be consistent with table/column names

🎓 Self-Assessment Checklist

[ ] I can write a basic SELECT statement

[ ] I can select all columns using *

[ ] I can filter rows with WHERE

[ ] I can use comparison operators (<, >, =)

[ ] I can combine conditions with AND

[ ] I can use OR for alternative conditions

[ ] I can use IN for multiple value matching

[ ] I understand when to use parentheses

[ ] I know advantages of SQL over spreadsheets

[ ] I can write queries for real-world scenarios

💡 Study Tips

1. Practice typing queries - syntax matters!

2. Start simple - one condition at a time

3. Test incrementally - add complexity gradually

4. Read error messages - they guide you

5. Draw diagrams - visualize your filters

6. Create flashcards for operators

7. Practice daily - 15 minutes makes perfect

🚀 Next Steps

After mastering these basics:

1. Learn about sorting with ORDER BY

2. Explore grouping with GROUP BY

3. Study aggregate functions (COUNT, SUM, AVG)

4. Practice joining multiple tables

5. Understand database design principles