Category : sql

Currently, I’m trying to get ratings from a website called bookstoscrape and feed it into a database as a practice but there’s an error raised InterfaceError: Error binding parameter 1 – probably unsupported type. here’s my code def getURLs(url): result = requests.get(url) soup = BeautifulSoup(result.text, ‘html.parser’) return(soup) def getBooks(url): soup = getURLs(url) # remove the ..

Read more

When I do a scraping, not many records are saved in the database, only one. Precisely only 1 record is inserted for each "for" loop. On the other hand, many records should be inserted for each "for" loop. For example, if I have 3 groups (Group1, Group2, Group3), only 3 records are inserted in the ..

Read more

When I do a scraping, not many records are saved in the database, only one. Precisely only 1 record is inserted for each "for" loop. On the other hand, many records should be inserted for each "for" loop. For example, if I have 3 groups (Group1, Group2, Group3), only 3 records are inserted in the ..

Read more

select a.FIRST_NAME, a.LAST_NAME, a.MANAGER, a.MANAGER_CODE, a.EMPLOYEE_CODE, b.FIRST_NAME as MANAGER_FN, b.LAST_NAME as MANAGER_LN, c.FIRST_NAME as DIRECTOR_FN, c.LAST_NAME as DIRECTOR_LN from emp_table a LEFT JOIN (select distinct manager_code, employee_code, first_name, last_name, end_date from emp_table) as b on a.manager_code = b.employee_code and b.end_date = (select max(end_date) from table) LEFT JOIN (select distinct manager_code,employee_code, first_NAME, LAST_NAME, END_DATE from emp_table) ..

Read more