blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
8193b19d672c2db72adc362637050989375e5d6d | SQL | okayly/JavaScript | /Temp/sp_gacha_re.sql | UTF-8 | 9,590 | 3.015625 | 3 | [] | no_license | CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_gacha_re`(
in p_UUID BIGINT,
in p_GACHA_ID INT,
in p_FREE BOOL,
in p_GOLD BIGINT,
in p_CASH INT,
in p_EXEC_COUNT INT,
in p_ITEM_ID_1 INT, in p_ITEM_COUNT_1 INT,
in p_ITEM_ID_2 INT, in p_ITEM_COUNT_2 INT,
in p_ITEM_ID_3 INT, in p_ITEM_COUNT... | true |
e2120cd686ba291e0bc0ee080c9a3fa582d75e80 | SQL | adrianhorning08/backend-template | /sql_queries.sql | UTF-8 | 4,283 | 4.03125 | 4 | [] | no_license | CREATE DATABASE lemondrops;
CREATE TABLE users (
id VARCHAR NOT NULL UNIQUE PRIMARY KEY,
email VARCHAR NOT NULL UNIQUE,
phone VARCHAR NOT NULL UNIQUE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_DATE,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_DATE
);
CREATE TABLE products (
id VARCHAR NOT NULL UNIQU... | true |
64241d2bb7e2b20b96310db0db2f5db3ba9a8458 | SQL | TimothyMee/school-system | /imported db/approvedresults.sql | UTF-8 | 2,701 | 2.765625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 18, 2017 at 12:41 PM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... | true |
6826c25a9d76b3790413bd011c8b13584cd40a47 | SQL | mmlcasag/website | /tabela/mov_pedido_web.sql | ISO-8859-1 | 4,647 | 3.265625 | 3 | [] | no_license | /*
CREATE TABLE "MOV_PEDIDO_WEB"
( "NUMPEDVEN" NUMBER(8,0) NOT NULL ENABLE,
"DIASENTMIN" NUMBER(3,0) NOT NULL ENABLE,
"DIASENTMAX" NUMBER(3,0) NOT NULL ENABLE,
"TRANSP" VARCHAR2(4000 BYTE),
"ENTREGAOK" CHAR(1 BYTE),
"PRONTUARIO_VENDEDOR" NUMBER(9,0),
"CODFIL_VENDEDOR" NUMBER(3,0),
"VLFRETE_REAL" NUM... | true |
e5081bc96ce0490b57a150656dc20d4c738bdd8e | SQL | RichDBA/SQLAdmin | /CacheWastingQueries.sql | UTF-8 | 470 | 3.734375 | 4 | [] | no_license | -- Find single-use, ad-hoc queries that are bloating the plan cache
SELECT TOP(20) [text] AS [QueryText], cp.size_in_bytes
FROM sys.dm_exec_cached_plans AS cp WITH (NOLOCK)
CROSS APPLY sys.dm_exec_sql_text(plan_handle)
WHERE cp.cacheobjtype = N'Compiled Plan'
AND cp.objtype = N'Adhoc'
AND cp.usecounts = 1
ORD... | true |
300b6127a22a6250c363c07212f4e8a8da311da1 | SQL | f981545521/cancer | /document/iblog_data.sql | UTF-8 | 29,873 | 3.296875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50717
Source Host : localhost:3306
Source Database : iblog_data
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2019-08-23 16:46:16
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
780c744838842b9b74c929442af2b6069e1192d7 | SQL | markyounan11/CodeFriender | /db/ucbxSchema.sql | UTF-8 | 412 | 2.703125 | 3 | [] | no_license | DROP DATABASE IF EXISTS developer_db;
CREATE DATABASE developer_db;
USE developer_db;
CREATE TABLE ucbxUsers (
id INTEGER NOT NULL AUTO_INCREMENT,
first_name VARCHAR (50) NOT NULL,
last_name VARCHAR (50) NOT NULL,
strength VARCHAR (100) NOT NULL,
weakness VARCHAR (100) NOT NULL,
bio VARCHAR (500) NOT NULL,
email VA... | true |
d2f2730091476cba838c40de731db7e296dd35a8 | SQL | Jordan-Castillo/CSC308_Lab4 | /CSU-info.sql | UTF-8 | 2,040 | 3.921875 | 4 | [] | no_license | /* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
* File Name : CSU-info.sql
* Purpose :
* Creation Date : 30-10-2017
* Last Modified : Tue 31 Oct 2017 02:28:34 PM PDT
* Created By : Jordan Castillo
* Email: jtcastil@calpoly.edu
_._._._._._._._._._._._._._._._._._._._._.*/
use csu;
-- Q 1) Report all campuses from LA... | true |
cb2c319f2358cefb41b56829b1e99b047faf1749 | SQL | KelvinRonaldo/gitLpw | /projetoPHP/cms/bd_docs/db_rcb_backup.sql | UTF-8 | 20,739 | 3.140625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: db_rrcb
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!... | true |
816323d8d37ede3c7964b5ef24ff36a715c87898 | SQL | phong100401/PHP | /htdocs/PHP/Practice/1.sql | UTF-8 | 471 | 2.890625 | 3 | [] | no_license | CREATE DATABASe if not EXISTS class;
use database class;
CREATE TABLE student(
id int(11) AUTO_INCREMENT PRIMARY KEY,
name varchar(255),
age tinyint(4),
address varchar(200),
telephone varchar(20)
);... | true |
75b370c9dcbce269716e0ca5c944dee1e80b3253 | SQL | macantivbl/BaseDatos | /DDL/PRACTICA.sql | UTF-8 | 673 | 3.015625 | 3 | [] | no_license | INSERT INTO PRODUCTOS(CODIGO,NOMBRE,PRECIO,UNIDADES,FECHA_ALTA)
VALUES(1,'tornillos1',100,10,TO_DATE('01/09/2017'));
INSERT INTO PRODUCTOS VALUES(2,'tuercas',50,5,TO_DATE('01/10/2009'));
INSERT INTO PRODUCTOS VALUES(2,'martillo',90,NULL,NULL);
INSERT INTO PRODUCTOS (CODIGO,NOMBRE,unidades)
VALUES (4,'Arandela',10)... | true |
a00cb6421c2406e4e6b8c831eca627be48088292 | SQL | aleo9/db | /file.sql | UTF-8 | 1,511 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Värd: 127.0.0.1
-- Tid vid skapande: 03 dec 2017 kl 23:54
-- Serverversion: 10.1.28-MariaDB
-- PHP-version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CH... | true |
e34aeb9d85ac171c231c9b7b372b4eba63ff69df | SQL | dmevalneto/SisPmsCore4 | /Banco/relatoriomanut.sql | UTF-8 | 733 | 3.40625 | 3 | [] | no_license | select
manutencao.idmanutencao, manutencao.flg, manutencao.data as DataSolicitada,
setor.nome as NomeSe,
item.nome as NomeItem,
historico_manutencao.idhistorico_manutencao, historico_manutencao.os, historico_manutencao.status_manutencao_idstatus_manutencao, historico_manutencao.data as DataAtendida,
status_manutencao.... | true |
20b4cf706c6756c5cd615c0a745a4280db63bf5b | SQL | dev-rubel/php_basic_feed | /php_feed.sql | UTF-8 | 4,078 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jan 14, 2021 at 09:56 AM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.2.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... | true |
16091a914455a29b23e69f7733f8d2c1cc984c18 | SQL | aldemarg911/conf_migra | /MIGRACION/CONF_ADMINISTRACION/08_Mig_Detrecibos_v01.sql | ISO-8859-1 | 5,718 | 3.03125 | 3 | [] | no_license | DECLARE
/******************************************************************************
NOMBRE: 08_Mig_Detrecibos_v01.sql
PROPSITO: Procedimiento que ejecuta carga de mig_detrecibos - PRODUCCION
REVISIONES:
Ver Fecha Autor Descripcin
--------- --------... | true |
8698a938853e574f2e63171818fc6c76a1704a77 | SQL | kyyoung/SQL- | /데이터 조회.sql | UTF-8 | 4,623 | 4.4375 | 4 | [] | no_license | 데이터 조회 방법
DESC 테이블명
해당 테이블의 정보를 조회할 수 있음
SELECT 변수 (* | 컬럼명 | 표현식 )
from 테이블명 | 뷰명
SELECT 문장을 이용하여 원하는 데이터를 가져올 수 있음
SELECT empno, ename, sal
from emp;
SQL 명령문은 대소문 구분을 하지 않음
SELECT empno, sal, sal*1.1, 1111, 'abcd'
from emp;
SQL 명령문은 변수에 곱하기를 할 수 있고, 숫자와 문자를 바로 출력할 수 있음. 단 문자의 경우 ''를 붙여야함
SELECT *... | true |
0ccae6acc9105c2e7c4717cdc9c67457dc091334 | SQL | guvensahin/benzer-sanatci | /doc/table_create.sql | UTF-8 | 249 | 3.28125 | 3 | [] | no_license | START TRANSACTION;
CREATE TABLE `last_viewed` (
`name` varchar(255) NOT NULL,
`datetime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `last_viewed`
ADD PRIMARY KEY (`name`),
ADD UNIQUE KEY `name` (`name`);
COMMIT; | true |
c60b02aa2c75e3229c0da0a2c62abbc47946c11d | SQL | cdesmarais/WebDB-Test | /WebDB/StoredProcedures/Common/dbo.FailedResos.PRC | UTF-8 | 685 | 3.671875 | 4 | [] | no_license | if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FailedResos]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[FailedResos]
GO
CREATE PROCEDURE dbo.FailedResos
AS
select r.rname
,r.rid
,e.listenerversion
,z.tzname
,count(*) as theFailures
from l... | true |
4d37df25ae8939463cbba0c72160d54b01b68130 | SQL | delphi1977/NewDicomPACS | /Database/oracle/procedures/asu.do_arrange_sroky.prc | WINDOWS-1251 | 3,250 | 3.40625 | 3 | [] | no_license | DROP PROCEDURE ASU.DO_ARRANGE_SROKY
/
--
-- DO_ARRANGE_SROKY (Procedure)
--
-- Dependencies:
-- STANDARD (Package)
-- SYS_STUB_FOR_PURITY_ANALYSIS (Package)
-- TSROKY (Table)
-- TPERESEL (Table)
-- GET_MAXPERESELID (Function)
-- GET_MAXSROKID (Function)
-- GET_PAC_OSTATOK_ARRANGE (Function)
--
CREATE... | true |
ccec3dfeab2b4a1909770ccdc3563cd5e21eeedd | SQL | TelemedDevGroup/TelemedProtoApp | /src/main/resources/db/changelog/v0.1/04.07.2020-Auth_Schema.sql | UTF-8 | 933 | 3.453125 | 3 | [] | no_license | --liquibase formatted sql
--changeset hlebstraltsou:04.07.2020-Auth_Schema
CREATE TABLE `user` (
user_id BINARY(16) NOT NULL,
email VARCHAR(255) NOT NULL,
email_verified BIT(1) NOT NULL,
image_url VARCHAR(255) DEFAULT NULL,
name VARCHAR(255) NOT NULL,
password VARCHAR(255) DEFAULT NULL,
provider VARCHAR(2... | true |
16c44827e3d0e27e9f63cc8c084c57252691abdf | SQL | inesitapequena/PublicRepo | /Question1.sql | UTF-8 | 578 | 4.25 | 4 | [] | no_license |
with aggregation AS(
SELECT row_number() OVER (PARTITION BY c."name" ORDER BY count(*) DESC) AS rownum
,f.title
,c."name"
,COUNT(DISTINCT r.rental_id) countofrentals
FROM rental r
LEFT JOIN inventory i
on i.inventory_id = r.inventory_id
LEFT JOIN film f
on f.film_id = i.film_id
LEFT JO... | true |
462ff4d519b2216d734661fd4b29e91113275c22 | SQL | savend/Gruppenarbeit_VS2_Trinat | /Datenbanken/ex05.sql | ISO-8859-3 | 3,348 | 4.09375 | 4 | [] | no_license | DROP SCHEMA IF EXISTS `ex05`;
-- In MySQL, the schema is the synonym for the database
-- DROP DATABASE [IF EXISTS] database_name;
CREATE SCHEMA `ex05` DEFAULT CHARACTER SET utf8 ;
USE `ex05`;
-- ex05.personen definition
CREATE TABLE `person` (
`pnr` int(11) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`vorname` ... | true |
8831c3604047136eaf9f49f2ab54d2d501500814 | SQL | igagula1/Seminarski-iz-UBP-pocetna-verzija- | /baza_onlinehop_konacna.sql | UTF-8 | 11,855 | 2.953125 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `bazaoshop` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE bazaoshop;
-- MySQL dump 10.13 Distrib 8.0.22, for Win64 (x86_64)
--
-- Host: localhost Database: webshop
-- ------------------------------------------------------
... | true |
4489df48c3d1525d0ae5e4638c6dc83c31dc10b9 | SQL | alexanderLazz/865889-yeticave | /queries.sql | UTF-8 | 3,689 | 3.265625 | 3 | [] | no_license | USE yeticave;
/* добавление категорий в таблицу category */
INSERT INTO `category` (`name`)
VALUES ('Доски и лыжи'),
('Крепления'),
('Ботинки'),
('Одежда'),
('Инструменты'),
('Разное');
/* добавление пользователей в таблицу user */
INSERT INTO `user` (`reg_date`, `email`, `name`, `password`, `a... | true |
b9875f1d53cbc30dcfc7b607d45e45aaf312999b | SQL | JBrooksCS/chinook---JBrooksCS | /queries/sales_agent_customer_count.sql | UTF-8 | 230 | 3.359375 | 3 | [] | no_license | -- top_agent.sql: Which sales agent made the most in sales over all?
SELECT E.FirstName, COUNT(*) as NumCustomers
FROM Employee E
JOIN Customer C on E.EmployeeId = C.SupportRepId
WHERE E.Title LIKE '%Sales%'
GROUP BY E.FirstName
| true |
eb96e3fee295b1a3678c315557afb25feffb7e5c | SQL | kern/pavlov-prime | /src/console/db/queries/entities/websites/selectByOrganizationId.sql | UTF-8 | 194 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | SELECT
websites.*
FROM
entity_graph.websites,
entity_graph.organizations_websites
WHERE
organizations_websites.organization_id = $1
AND
organizations_websites.website_id = websites.id
| true |
845a4f5be366ec82f2149e02677d27254321d6c8 | SQL | crystron/jsp-servlet | /DB/Proc/TimKiemSach.sql | UTF-8 | 198 | 2.796875 | 3 | [] | no_license | Create Proc searchBookByName(@StrSearch Nvarchar(50))
as
BEGIN
SELECT *
FROM Sach
WHERE TenSach Like N'%'+@StrSearch+'%' OR MaSach Like N'%'+@StrSearch+'%'
END
searchBookByName 'Đấm' | true |
94ea74fd489a000fbed16e06e452901a20ebfd31 | SQL | Nunweiler/bdic-dm | /schema/ts05/DML_Carga/BDIC-DM_estado.sql | UTF-8 | 2,902 | 3.25 | 3 | [] | no_license | CREATE DATABASE IF NOT EXISTS `BDIC-DM` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci */;
USE `BDIC-DM`;
-- MySQL dump 10.13 Distrib 5.5.43, for debian-linux-gnu (i686)
--
-- Host: orion2412.startdedicated.net Database: BDIC-DM
-- ------------------------------------------------------
-- Server v... | true |
a1aea0e4f3970d16409bd256af7653dbacba549c | SQL | aakasht05/DojoAssignments | /Python/04_SQL/sakila.sql | UTF-8 | 2,436 | 4.0625 | 4 | [] | no_license | -- 1
-- SELECT customer.first_name,customer.last_name,customer.email,address.address FROM address
-- JOIN customer ON address.address_id=customer.address_id
-- WHERE address.city_id = 312;
-- 2
-- SELECT film.title,film.description,film.release_year,film.rating,film.special_features,category.name FROM film_category
--... | true |
9a8502d0beb1010796ac383bff09d84c970bc8b2 | SQL | daviesluke/awr_monitoring | /py_awr_tables.sql | UTF-8 | 4,769 | 3.46875 | 3 | [] | no_license | /* Main Metrics table */
CREATE TABLE py_awr_metrics_parameters (
name VARCHAR2(64 BYTE) NOT NULL
, metric_type VARCHAR2(10 BYTE) NOT NULL
, monitored CHAR(1 BYTE) NOT NULL
, who VARCHAR2(30 BYTE) NOT NULL
, pct_threshold NUMBER
... | true |
1cd2451e59ca8e394ea8d0d33eff527ec412acb4 | SQL | quaiton89/migration_4g | /4G_MIGRATION/bin/Debug/TABLE/MYSQL/40.4세대_협정관세적용신청 정정신청서(105)_MYSQL.sql | UHC | 8,323 | 3.265625 | 3 | [] | no_license |
/* ۽_ û */
DROP TABLE IF EXISTS CUSAGREEJ;
/* ۽_ û */
CREATE TABLE CUSAGREEJ (
CJ_JNO VARCHAR(6) NOT NULL, /* ȣ */
CJ_JYY VARCHAR(4) NOT NULL, /* */
JJSEQ VARCHAR(3) NOT NULL, /* */
CJ_SINCHUNG_KIND VARCHAR(3), /* û */
CJ_SINCHUNG_SAYU VARCHAR(50), /* û */
CJ_SINCHUNG_SANGHO VARCHAR(28), /* ûλȣ */
... | true |
683f90da23a6c78f7408cbcb82e473c97dc055cd | SQL | rameez-uc/yii2-admin | /src/db/db_schema.sql | UTF-8 | 2,245 | 3.4375 | 3 | [] | no_license | -- Table structure for table `tbl_site_map_file`
CREATE TABLE IF NOT EXISTS `sitemap_file`(
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`sitemap_url_path` VARCHAR(500) NOT NULL,
`sitemap_data` MEDIUMTEXT DEFAULT NULL,
`created_date` DATETIME NOT NULL,
`last_modified_date` DATETIME NOT NULL,
`url_... | true |
4180c5311eb8530f2f4a0785164e9feda80530f2 | SQL | akmohamdy/ahmed-khaled-sat-4 | /queries.sql | UTF-8 | 394 | 3.125 | 3 | [] | no_license | SELECT DISTINCT orderNumber FROM orderdetails WHERE productCode LIKE 'S18%' AND price > 100
SELECT * FROM payments WHERE paymentDate LIKE "___5%" OR paymentDate LIKE "___6%" OR paymentDate LIKE "_____05%" OR paymentDate LIKE "_____06%"
SELECT * FROM customers WHERE country = "USA" AND (phone LIKE "%5555%" OR phone... | true |
e50658a3a7dcdb20a349044017b52a5b3f998a09 | SQL | joseroma/jersey-api-rest | /SQL/createDB.sql | UTF-8 | 3,452 | 3.703125 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -... | true |
d05d1829e973ed34b57ad1bbb3b3c542c0c8bdd1 | SQL | dricazenck/especialization | /scripts/cassandra.sql | UTF-8 | 3,980 | 3.109375 | 3 | [] | no_license | CREATE KEYSPACE candidatos with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1};
USE candidatos;
CREATE COLUMN FAMILY diarias
WITH comparator = UTF8Type
AND key_validation_class=UTF8Type
AND column_metadata = [
{column_name: key, validation_class: UTF8Ty... | true |
1fd9f1c867af06390828d684921c9e61490bc090 | SQL | nss-day-cohort-16/chinook-samphillips1879 | /answers/total_invoices_2009.sql | UTF-8 | 153 | 3.015625 | 3 | [] | no_license | -- How many Invoices were there in 2009
SELECT COUNT(*) AS "Number of Invoices in 2009"
FROM Invoice
WHERE InvoiceDate LIKE "2009%"
ORDER BY InvoiceDate | true |
b0b89cf029d2359c63b22535ea41c3c45f32ec2f | SQL | bellmit/flexdb | /2.HOST/1.View/v_gl_stock_info_hist.sql | UTF-8 | 274 | 2.828125 | 3 | [] | no_license | create or replace force view v_gl_stock_info_hist as
select sbh.symbol , to_char(histdate,'YYYY-MM-DD' ) txdate ,sbh.basicprice
from securities_info_hist sbh, sbsecurities sb
where sbh.codeid = sb.codeid
and sb.tradeplace in ('001','002','005') and sb.sectype <>'004';
| true |
d04bd8b33b8d571c282b31ea2800a824dbc36916 | SQL | bryan-gilbert/assignments | /public/question4/part_b_b.sql | UTF-8 | 999 | 4.1875 | 4 | [
"Unlicense"
] | permissive | # use bookazon;
# source Bookazon.sql;
# b. Who is the best-selling author in each of the last 5 years, by unit volume (the number of books sold),
# and by sales volume (the total value of their sales) in the category Fiction > Thrillers > Spy Novels
SET @cat = 'Fiction > Thrillers > Spy Novels';
#SET @cat = 'Fiction'... | true |
cf1400d75c4013737a21bd9c5773f513770ca5e6 | SQL | sujithmenonp/quizmaster | /src/main/resources/schema.sql | UTF-8 | 874 | 3.171875 | 3 | [] | no_license | drop extension "uuid-ossp";
create extension "uuid-ossp";
create schema if not exists quiz_master;
create table if not exists quiz_master.guest (
user_id varchar NOT NULL ,
reg_time timestamp,
name varchar,
email varchar,
pass varchar
);
create table if not exists quiz_master.question (
qu... | true |
7e3fdbb06e8e572c406807e8ffab3f1ea4f089bb | SQL | stambi4a/DatabasesBasicsMSSQL | /SQL Server/Built-In-Functions/Exercises/SQLGeographyQuery.sql | UTF-8 | 335 | 3.53125 | 4 | [] | no_license | --SELECT CountryName, IsoCode FROM Countries
--WHERE CountryName LIKE '%a%a%a%'
--ORDER BY IsoCode
--SELECT [Peaks].[PeakName], [Rivers].[RiverName],
--STUFF(LOWER(PeakName),LEN(PeakName),LEN(RiverName), LOWER(RiverName)) AS "Mix"
--FROM Peaks CROSS JOIN Rivers
--WHERE LEFT(REVERSE(PeakName), 1) = LEFT(RiverName, 1)
-... | true |
e1f7694ed5fb6ba2d9f634df0cf5fc17b6c29b41 | SQL | GiorgiKalandadze/DataBase-2018-Fall | /Assignment 1/Solution.sql | UTF-8 | 2,932 | 4.375 | 4 | [] | no_license | --1
select e.first_name,
e.last_name,
e.job_id,
e.salary,
d.department_name,
m.city,
(select max(j.salary) from employees j) max_sal
from employees e
join departments d
on d.department_id = e.department_id
join locations m
on m.location_id = d.locati... | true |
e6d91f8692c43fb235997af678e471ec909703a9 | SQL | fwu96/SQL-JDBC | /Query7.sql | UTF-8 | 1,084 | 4.15625 | 4 | [] | no_license | with good_department as (
select distinct temp3.dept
from (select count (distinct temp1.store), temp1.dept
from (select sum(weeklysales) as deptsale, dept, store
from hw2.sales
group by dept, store) as temp1,
(select sum(weeklysales) as storesale, store
from hw2.sales
group by store) as temp2
w... | true |
64cd6486d69f49c9a9004ff9216ab94371788c55 | SQL | jboismar/SKM | /skm_creation.sql | UTF-8 | 8,813 | 3.125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | -- phpMyAdmin SQL Dump
-- version 2.11.3deb1ubuntu1.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 17, 2010 at 10:05 AM
-- Server version: 5.0.51
-- PHP Version: 5.2.4-2ubuntu5.10
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `skm`
--
DROP DATABASE IF EXISTS `skm`;
CREATE DATABAS... | true |
8167d40772a7bdf31aca619ed1acd3353e3a8b50 | SQL | wayath/RssServer | /server/src/main/resources/rss.sql | UTF-8 | 4,467 | 3.484375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1build0.15.04.1
-- http://www.phpmyadmin.net
--
-- Client : localhost
-- Généré le : Sam 26 Mars 2016 à 02:54
-- Version du serveur : 5.6.28-0ubuntu0.15.04.1
-- Version de PHP : 5.6.4-4ubuntu6.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*... | true |
f627cd87c982492bfd430a1e6e2b21d549a88c36 | SQL | kurian-thomas/s5 | /dblab/cycle2/cotrol.sql | UTF-8 | 495 | 3.1875 | 3 | [] | no_license | SELECT IF (1=1,'TRUE','FALSE');
SELECT
id,name
FROM
HUMAN
ORDER BY (CASE
WHEN name IS NULL THEN id
ELSE name
END);
SELECT IF(id > 1 && id<4,'cs','ec') FROM HUMAN;
UPDATE HUMAN
SET
grade=(CASE
WHEN mark>90 THEN 'A+'
WHEN mark=90 THEN 'A'
WHEN mark<45 THEN 'F'
ELSE 'B'
END);
CALL Get(... | true |
28b29d0a18f21e14d94042f97823e8492823f48b | SQL | FelipeMH-dev/tubesoft-test-felipe-mansilla | /backend/db.sql | UTF-8 | 347 | 2.53125 | 3 | [] | no_license | CREATE TABLE IF NOT EXISTS timestamps(
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
timestamp text NOT NULL CHECK (timestamp <> '')
);
INSERT INTO timestamps (timestamp)
VALUES ('10:01:02');
INSERT INTO timestamps (timestamp)
VALUES ('04:02:23');
INSERT INTO timestamps (timestamp)
VALUES ('20:44... | true |
8801aa1f697c4fe820eba5957b6c3d95389af683 | SQL | ripples/lv-server | /server/sql/courses-from-user-id.sql | UTF-8 | 187 | 3.546875 | 4 | [] | no_license | SELECT
c.id,
c.name
FROM courses c
INNER JOIN lkp_course_users lcu ON c.id = lcu.course_id
INNER JOIN semesters s ON s.id = c.semester_id
WHERE lcu.user_id = ?
AND s.id = ?
| true |
8437bfd9d18901f0bb29f430daf6e0f60a4080c2 | SQL | rafikhan7/atlogys_hr | /database.sql | UTF-8 | 551 | 3.234375 | 3 | [] | no_license | CREATE TABLE posts (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
title VARCHAR(256),
body TEXT,
created DATETIME DEFAULT NULL,
modified DATETIME DEFAULT NULL,
status TINYINT DEFAULT 1
);
CREATE TABLE users (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
u... | true |
cea09499a277455394a362f41c1e5bc8dfe5a406 | SQL | kojo9999/a-zGadgets | /SQL dumps/sql dump.sql | UTF-8 | 4,963 | 2.65625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 01, 2019 at 02:50 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: ... | true |
ee490bf09a6f609daf4949a1f1c1eed22a3e2d63 | SQL | taylornjohnson/SQL | /EmployeeSQL/Instructions/SQL finals/schemascript.sql | UTF-8 | 580 | 2.96875 | 3 | [] | no_license | ---Create tables
CREATE TABLE titles (
title_id VARCHAR(10),
title VARCHAR(30)
);
CREATE TABLE salaries (
emp_no INT,
salary VARCHAR(10)
);
CREATE TABLE employees (
emp_no INT,
emp_title_id VARCHAR(10),
birth_date DATE,
first_name VARCHAR(30),
last_name VARCHAR(30),
sex VARCHAR(10),
hire... | true |
6c4f64b34c1c1ceeaba316e817dfaee468282e2f | SQL | CodeForAfrica/HURUmap-Data | /sql/py_revenue.sql | UTF-8 | 7,031 | 2.953125 | 3 | [] | no_license | SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
ALTER TABLE IF EXISTS ONLY public.py_revenue DROP CONSTRAINT IF EXISTS pk_py... | true |
432b6d087807cda9d02623f63bde7f8f84b51b7e | SQL | odairpedrosojunior001/UDACITY-DADOS | /order by 2.sql | UTF-8 | 87 | 2.640625 | 3 | [] | no_license | SELECT id,occurred_at,total_amt_usd
FROM orders
ORDER BY total_amt_usd desc
LIMIT 5; | true |
4006de772362aae2357083a826e7855624311b3b | SQL | wada811/wedding.wada811.com | /wedding_board.sql | UTF-8 | 619 | 3.390625 | 3 | [] | no_license | CREATE USER 'wedding_user'@'localhost' IDENTIFIED BY 'wedding_pass';
SELECT User,Host from mysql.user;
DROP USER 'wedding_user'@'localhost'
CREATE DATABASE wedding;
GRANT SELECT, INSERT, UPDATE ON wedding.* TO wedding_user@localhost;
USE wedding;
CREATE TABLE images (
id INT(11) NOT NULL AUTO_INCREMENT,
u... | true |
a256297048236a2da280df71411f9f1c96d3acd9 | SQL | ryanberger/BostonUniversityCoursework | /CS601_Web_App_Dev/Project/MySQL/database_tables.sql | UTF-8 | 1,676 | 3.515625 | 4 | [] | no_license | CREATE TABLE vendor_info
(
vendor_id INT NOT NULL AUTO_INCREMENT,
vendor_name VARCHAR(50),
address VARCHAR(100),
phone VARCHAR(50),
email VARCHAR(60),
PRIMARY KEY(vendor_id)
);
CREATE TABLE prod_info
(
prodcode VARCHAR(5) NOT NULL,
prodname VARCHAR(50),
approx_size INT... | true |
5a99b8ee9aa881f0dbeff04dd6204ba7cbbb1609 | SQL | jwnichols3/esm-essb | /portlets/BAC2EEBBridge/trunk/sql/.svn/text-base/sql_server2000.sql.svn-base | UTF-8 | 2,325 | 2.734375 | 3 | [] | no_license | DROP TABLE http_request_attributes;
CREATE TABLE http_request_attributes (
row_id varchar(255) NOT NULL,
request_id varchar(255) default NULL,
attribute_name varchar(255) default NULL,
attribute_persistence varchar(255) default NULL,
PRIMARY KEY (row_id)
);
DROP TABLE http_request_cookies;
CREATE TABLE http... | true |
656bd8bbef9b27cdb094afb9c136bafa7cd6f83c | SQL | bAfshari/relational-database-application | /sql/useful queries.sql | UTF-8 | 4,365 | 4.71875 | 5 | [] | no_license | -- calculate the stipend of employees based on the
-- hours she/he worked on different projects
SELECT w.empID, (sum( w.hours))* e.salary AS employeeStpend
FROM HoursWorkedOnProject w
JOIN (SELECT empID, salary
FROM Employee ) AS e
ON w.empID = e.empID
GROUP BY empID
ORDER BY empID ASC;
-- who works under ... | true |
ff47349b3baa049322354140e4219fe3d1141965 | SQL | arteam/jdit-examples | /custom-dbi-factory/src/test/resources/bikeDao/bikes.sql | UTF-8 | 948 | 2.625 | 3 | [
"MIT"
] | permissive | insert into models (id, name, manufacturer_id, type_name, year) values
(1, 'Synergy', 1, 'cross', 2015),
(2, 'Avion', 1, 'cross', 2014),
(3, 'Codex', 1, 'cross', 2014),
(4, 'Introvert', 1, 'cross_country', 2015),
(5, 'Vectra', 1, 'cross_country', 2014),
(6, 'Charisma 77', 1, 'road', 2015),
(7, 'Aura 44', 1, 'road', 201... | true |
a27db8919576f669dfcb12831620800f4f44adc9 | SQL | ashleighdevito/etl_project | /Working/Update_08_06_21_ETL_Project_ER_Diagram.sql | UTF-8 | 5,202 | 3.21875 | 3 | [] | no_license | -- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- Link to schema: https://app.quickdatabasediagrams.com/#/d/Zeny7K
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
SET XACT_ABORT ON
BEGIN TRANSACTION QUICKDBD
CREATE TABLE [County] (
[County_ID] ... | true |
5c868bbebd008e43107426921842332a2e71147a | SQL | andrewbars/tickets | /conf/evolutions/default/5.sql | UTF-8 | 447 | 3.21875 | 3 | [] | no_license | # ---!Ups
CREATE TABLE bookings(
id BIGINT AUTO_INCREMENT,
eventID BIGINT,
date DATETIME,
clientName VARCHAR(30) CHARACTER SET utf8,
expDate DATETIME,
price INTEGER,
confirmed BOOLEAN,
PRIMARY KEY (id)
);
ALTER TABLE `sits` ADD `booked` BOOLEAN NOT NULL;
ALTER TABLE `sits` ADD `bookingID` BIGINT NUL... | true |
22a63a9b46e764ed5ad5a50339f770fc608f94c9 | SQL | Ripa-Shah/DBA-Scripts | /Swap Advisor information/update_advisor_stud_table for advisor.sql | UTF-8 | 870 | 3.375 | 3 | [
"MIT"
] | permissive | --select @@VERSION;
-- update ADVISOR_STUD_TABLE
-- set
-- advisor_stud_table.advisor_id='5678'
-- FROM adv_master LEFT OUTER JOIN student_master ON adv_master.id_num = student_master.id_num LEFT OUTER JOIN class_definition ON student_master.current_class_cde = class_definition.class_cde,
-- ... | true |
d22f0c7e322d3bb0c1adf284a331c51be2c32ba8 | SQL | meghanvl/ETL | /qbSchema.sql | UTF-8 | 1,147 | 2.875 | 3 | [] | no_license | DROP TABLE IF EXISTS sb_qbs;
DROP TABLE IF EXISTS passer_rating;
DROP TABLE IF EXISTS pass_td;
DROP TABLE IF EXISTS int_percent;
DROP TABLE IF EXISTS yards_per_attempt;
DROP TABLE IF EXISTS pass_yards;
DROP TABLE IF EXISTS comp_percent;
CREATE TABLE "sb_qbs" (
"season" integer,
"super_bowl" varchar,
"quarterback" v... | true |
3c13f75be420403913e13900cd623359be85577f | SQL | Dawad81/Dawad81-IS361_Database-Architecture | /FinalProject_DennisAwad.sql | UTF-8 | 5,124 | 3.671875 | 4 | [] | no_license | /* Final Project IS361 Dennis Awad
Below is the SQL Querry that will be run to Load the flights and planes Data into tables */
DROP TABLE IF EXISTS airlines;
DROP TABLE IF EXISTS airports;
DROP TABLE IF EXISTS flights;
DROP TABLE IF EXISTS planes;
DROP TABLE IF EXISTS weather;
CREATE TABLE airlines (
carrier varchar... | true |
dc9d132992f5f8017a17410565b26980e8885310 | SQL | wagnerush/Oat_optativa | /oat.sql | UTF-8 | 808 | 2.765625 | 3 | [] | no_license | create database carro;
use carro;
create table info_carros (id int auto_increment not null primary key, modelo varchar(50) not null, ano int not null, valor float(10) not null);
alter table info_carros add column nome varchar(100) not null after valor;
alter table info_carros add column telefone varchar(14) not null... | true |
c31f5c665dd557f9459b55f24ecce6864526a894 | SQL | 7imonn/PicHubPHP | /scriptsdb/pichub.sql | UTF-8 | 3,818 | 3.25 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 22. Dez 2017 um 16:53
-- Server-Version: 10.1.28-MariaDB
-- PHP-Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_C... | true |
cc3f1fc36cb23723690eef887b2052cc6b06f70c | SQL | UFOP-CSI477/2018-02-atividades-raffoliveira | /Activity_03_04/laravel/banco.sql | UTF-8 | 10,693 | 3.453125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 30/10/2018 às 08:10
-- Versão do servidor: 5.7.22
-- Versão do PHP: 7.1.16
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... | true |
0950e29382e86fa3b9ea5ae82f7ed9bd86614224 | SQL | softreaver/TP_Oracle_SQL | /TP3.sql | WINDOWS-1252 | 10,288 | 4.03125 | 4 | [] | no_license | /* TP3 SQL CNAM 2020 - Christopher MILAZZO */
-- 1. Excuter les requtes suivantes et conclure :
-- a) select NOMA, NOMF from ART, FRS ;
select NOMA, NOMF from ART, FRS ;
-- OBSERVATION : Renvoi le produit cartsien des table ART et FRS puis fait un projection des colonnes ART.NOMA et FRS.NOMF
-- b) select NOMA, NOMF f... | true |
f3e59f01ebad824901f723e1c5307345bf9b0175 | SQL | andrespoliv/proyectoJuegos | /db/db.sql | UTF-8 | 486 | 3 | 3 | [] | no_license | CREATE USER andrespoliv;
GRANT ALL PRIVILEGES ON *.* TO 'andrespoliv' @'%' IDENTIFIED BY 'PhCrvn0qD5aDqQu7';
FLUSH PRIVILEGES;
CREATE DATABASE tic_tac_toe;
USE tic_tac_toe;
CREATE TABLE usuarios(
id INT(11) NOT NULL,
usuario VARCHAR(30) NOT NULL,
nombre VARCHAR(30) NOT NULL,
apellido VARCHAR(30) NOT NULL,
ema... | true |
935cfece3fb30ba5098de11a1b3046688a1d390f | SQL | lisaxwl/nodeExpressMysql | /bookcategory.sql | UTF-8 | 2,347 | 2.890625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : xwl
Source Server Version : 50525
Source Host : localhost:3306
Source Database : managementstudent
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2018-12-19 17:21:46
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
43db94972626b29be42a1a3600e298962cdb0fff | SQL | arslanugur/db | /sql/functions.sql | UTF-8 | 1,400 | 4.0625 | 4 | [] | no_license | --The UPPER Function
The UPPER function converts all letters in the specified string to uppercase.
The LOWER function converts the string to lowercase.
The following SQL query selects all LastNames as uppercase:
SELECT FirstName, UPPER(LastName) AS LastName
FROM employees;
If there are charac... | true |
22ac1ca7164340dbc31bc4df56a56f6f42108339 | SQL | PrabakarSiva/Class-Search-System | /courseData.sql | UTF-8 | 5,166 | 3.25 | 3 | [] | no_license | CREATE DATABASE /*!32312 IF NOT EXISTS*/ courseData;
USE courseData;
DROP TABLE IF EXISTS courses;
CREATE TABLE courses (
coursesID INT NOT NULL AUTO_INCREMENT,
professors varchar (25) NOT NULL,
classNum varchar (8) NOT NULL,
roomNum varchar (6) NOT NULL,
classTimes varchar (25) NOT NULL,
meetingDays varchar ... | true |
47f642c6ab8ff1bdca4259767e0f39345ee11f8e | SQL | graphile-contrib/pg-many-to-many | /__tests__/schemas/p/data.sql | UTF-8 | 481 | 2.65625 | 3 | [
"MIT"
] | permissive | insert into p.person (id, person_name) values
(1, 'Person1'),
(2, 'Person2'),
(3, 'Person3');
insert into p.team (id, team_name) values
(1, 'Team1'),
(2, 'Team2'),
(3, 'Team3');
insert into p.membership (person_id, team_id, created_at) values
(1, 1, '2018-01-01T12:00:00Z'),
(1, 2, '2018-01-02T12:00:00... | true |
aae17985502a27e81bf1ff16a0f1e2caeb9182b0 | SQL | devmaufh/DataTables | /instructions.sql | UTF-8 | 455 | 2.921875 | 3 | [] | no_license | Select 'Crear esquema llamado escuela';
create table curso(
id_curso serial not null,
titulo varchar(60),
descripcion varchar(126),
costo number (12,2),
constraint pkCurso primary key(id_curso)
);
insert into curso(titulo,descripcion, costo)values
('Curso de PHP','Curso avanzado de php y postgresq... | true |
b21f776a81bf09a746bec0d2c9883d50d5f4001e | SQL | awangjordisaputra/VISUAL_C2_1515015218_250696 | /src/Revisi Kak/revisi.sql | UTF-8 | 2,010 | 2.921875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 22, 2017 at 08:54 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
b38124444740115f2761db32d57455229c9f8c79 | SQL | gopi158/Sample | /FinaoDb/Stored Procedures/unusedtile.sql | UTF-8 | 647 | 3.5625 | 4 | [] | no_license | DELIMITER //
DROP PROCEDURE IF EXISTS unusedtile //
CREATE PROCEDURE unusedtile (IN id INT)
BEGIN
IF EXISTS (SELECT userid FROM fn_user_finao_tile WHERE userid = id)
THEN
SELECT tile_id
, tilename
, tile_imageurl
FROM fn_tilesinfo
WHERE tile_id NOT IN ( ... | true |
3dab08939cd0c0c29534621015185325535f8cd6 | SQL | whdghks8021/OracleBackUp | /myMem~2(2018-12-18).sql | UHC | 813 | 3.515625 | 4 | [] | no_license | -- myMem Դϴ.
-- GROUP BY ̿ؼ table ͷ
-- ߺ list ϱ
-- SELECT Ʈ ټ Ÿµ
-- ǥ 1 ϰ
-- GROUP BY ؼ SQL ۼѴ.
SELECT io_inout
FROM tbl_iolist;
SELECT io_inout
FROM tbl_iolist
GROUP BY io_inout;
-- ߺ ǰ Ʈ ϴ SQL
SELECT io_cname
FROM tbl_iolist
GROUP BY io_cname;
SELECT d_name
FROM tbl_dept;
-- ŷó ߺȰ Ʈ
SE... | true |
32a610a99c1b3656e6856264207edf971cab807e | SQL | weskerjax/pure-mvc | /app/tables.sql | UTF-8 | 476 | 3.484375 | 3 | [] | no_license |
DROP TABLE IF EXISTS category;
CREATE TABLE category ( /*分類(主鍵:cat_id)*/
id INTEGER PRIMARY KEY AUTOINCREMENT /*分類ID(主鍵)*/,
name VARCHAR(32) NOT NULL /*分類英文名稱*/,
remark VARCHAR(256) /*備註*/,
entry_date DATETIME NOT NULL ... | true |
0f9e617dceaaa01ff70a2b8e88471f1321be6c29 | SQL | blablauser/DID | /raw data. sampling. choices/6.19_verion v0.1 of_db/finalTablesForDb/data_dump_v_0_1.sql | UTF-8 | 2,139,390 | 2.984375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 2.11.11.3
-- http://www.phpmyadmin.net
--
-- Host: ramen.cs.man.ac.uk
-- Generation Time: Jun 20, 2012 at 12:46 AM
-- Server version: 5.0.77
-- PHP Version: 5.1.6
--
--
-- date: 19 JUNE 2012; v 0.1
-- Alina
--
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `other_balusesa`
... | true |
7ea5df15bb20a245af5b45857377bbc5d5f09b22 | SQL | kvenLin/remark-system | /src/main/resources/sql/remarksystem.sql | UTF-8 | 5,803 | 3.40625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50723
Source Host : localhost:3306
Source Database : remarksystem
Target Server Type : MYSQL
Target Server Version : 50723
File Encoding : 65001
Date: 2018-10-22 17:10:28
*/
SET FOREIGN_KEY_CHECKS=0;
... | true |
e386dfd16a42d7cdf58c304d9f2a0e4c267a790b | SQL | zhangyudong0215/FightAgainstLeetCode | /SQL/183. Customers Who Never Order.sql | UTF-8 | 146 | 3.09375 | 3 | [] | no_license | -- Write your MySQL query statement below
select C.Name Customers
from Customers C left join Orders O on C.Id = O.CustomerId
where O.Id is null
;
| true |
b31802e57cf95b92f58f84731015eaa3ce0a0417 | SQL | yahavb/amazon-aurora-call-to-amazon-sagemaker-sample | /players-transactions/detect_transaction_cheat.sql | UTF-8 | 248 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | select auth_cheat_mv.timestamp auth_time, trs_cheat_mv.timestamp trans_time, trs_cheat_mv.playerguid player
from trs_cheat_mv, auth_cheat_mv
where trs_cheat_mv.playerGuid=auth_cheat_mv.playerGuid and auth_cheat_mv.timestamp<trs_cheat_mv.timestamp;
| true |
95d85aa08b59b84d842e71afef3c3f016ac7bfc0 | SQL | ImTheRealOne/CPP-Practice | /CrackingCodingInterview/Ch. 14 Database/StudentGradeTop10.sql | UTF-8 | 1,279 | 4.03125 | 4 | [] | no_license | /* prepare stmt from 'select avg(grade) as g from grades group by student_ID order by g desc limit ?';
(select count(*) into @percentile from student);
select @percentile * .1 into @test;
execute stmt using @test;
(SELECT
COUNT(*)
INTO @percentile FROM
student);
SELECT @percentile * .1 I... | true |
48b9a4692b96277291a2c8416be3506c8b3ef430 | SQL | jabirsubaktagin16/FlySky_AirTicketManagement | /Fly.sql | UTF-8 | 7,674 | 4.3125 | 4 | [] | no_license | Alter login sa with password = '123456'
Alter login sa enable
CREATE DATABASE FLY_SKY;
USE FLY_SKY;
--Passenger Table--
CREATE TABLE PASSENGER(
CustomerId int IDENTITY(1001,1) PRIMARY KEY,
Name VARCHAR(50) NOT NULL,
Email VARCHAR(70) NOT NULL UNIQUE CHECK(Email LIKE '%_@__%.__%' AND PATINDEX('%[^a-z,0-9,@,.,_,\-]%',... | true |
589d3e032ea537cae4e9cd04a284408dd1975f05 | SQL | chnlsw/Realworld-Conduit | /src/main/resources/db/migration/V1__init_table.sql | UTF-8 | 267 | 2.8125 | 3 | [] | no_license | create table users (
id varchar(128) PRIMARY KEY,
username varchar(128) UNIQUE,
password varchar(128),
email varchar(128) UNIQUE,
bio text,
image varchar(256)
);
create table follows (
user_id varchar(128) not null,
follow_id varchar(128) not null
); | true |
51daddb48755bf908356e61534bf76f113da3723 | SQL | Nibelung-lst/malls | /src/main/java/com/lst/malls/SQL/malls.sql | UTF-8 | 14,974 | 3.15625 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : SearchNibelung
Source Server Version : 80017
Source Host : localhost:3306
Source Database : malls
Target Server Type : MYSQL
Target Server Version : 80017
File Encoding : 65001
Date: 2019-10-09 17:03:43
*/
SET FOREIGN_KEY_CHECKS=0;
-... | true |
95111705aa500cc318d2492a85a3bbae24b1cbed | SQL | momchilovv/SoftUni | /C# DB Fundamentals/C# Databases Basics/Indices and Data Aggregation/14.EmployeesMinimumSalaries.sql | UTF-8 | 128 | 3.359375 | 3 | [
"MIT"
] | permissive | SELECT DepartmentID, MIN(Salary)
FROM Employees
WHERE HireDate > '2000-01-01' AND DepartmentID IN (2,5,7)
GROUP BY DepartmentID; | true |
e6856ffe144ff0fd315c3a97c8b220e2b8c09e4a | SQL | cssat/sql_dev | /ca_ods/annual_report/Stored Procedures/sp_ar_cfsr_permanency_re_entry.sql | UTF-8 | 392 | 2.90625 | 3 | [] | no_license | CREATE PROCEDURE annual_report.sp_ar_cfsr_permanency_re_entry (@p_date VARCHAR(3000))
AS
SELECT DATEFROMPARTS(dat_year, 10, 1) AS 'Fiscal Year'
,region AS 'Region'
,sex AS 'Sex'
,race AS 'Race'
,age_cat AS 'Age Category'
,cd_discharge AS 'Discharge Type'
,re_entry AS 'Percent'
FROM [annual_report].[cfsr_permanen... | true |
5cfaa11e12fd4730746c461d73a5000e29cceb3f | SQL | ItaloGabs/Instruct-SQL | /COMANDOS_SQL.sql | UTF-8 | 20,136 | 4.21875 | 4 | [] | no_license | --CRIANDO UM BANCO DE DADOS
CREAT DATABASE NOMEDOBANCO;
--EXCLUINDO BANCO
DROP DATABASE NOMEDOBANCO;
**COMANDOS**
--ATENÇÃO--
--Sempre usar o comando em caixa alta e o que estiver sendo filtrado Minusculo
--Operadores SQL--
( '=' igual, '>' Maior que, '<' Menor que, '>=' Maior que ou igual, '<=' Menor que ou igual, '... | true |
63601fe9b8308940bcc49689ddc2d28bc3534c06 | SQL | Minkov/python-web-2021-05 | /postgres_demos/query1.sql | UTF-8 | 218 | 3.5625 | 4 | [] | no_license |
SELECT t.title, t.state, t.description, p.name
FROM todos_person p
LEFT JOIN todos_todo t
ON t.owner_id = p.id
WHERE NOT t.state
AND lower(t.description) LIKE '%desc%'
ORDER BY title;
| true |
1cc0220a5afc29a8a6341442b7e91f6f72cc849b | SQL | wujun728/jun_java_plugin | /jun_spring_plugin/spring_springjdbc/doc/user.sql | UTF-8 | 1,290 | 2.609375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : LocalMySql
Source Server Version : 50624
Source Host : 172.25.9.99:3306
Source Database : sanxia
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
Date: 2016-06-14 10:12:33
*/
SET FOREIGN_KEY_CHECKS=0;
--... | true |
c928c3f02fa15a47f7be98389d831935e4a09829 | SQL | SaptoEnd/biomedis | /biomedis.sql | UTF-8 | 10,427 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 14, 2019 at 12:52 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
145a96c988bf5113af817c7faa8e5da8b6465bba | SQL | ceyhunsahin/TRAINING | /CLARUSWAY/DBMS/SQL_Aggregate_Functions_FocusGroup.sql | UTF-8 | 8,628 | 4.65625 | 5 | [] | no_license | -- SQL Server Aggregate Functions --
-- An aggregate function performs a calculation on a set of values, and returns a single value.
-- Except for COUNT(*), aggregate functions ignore null values.
-- Aggregate functions are often used with the GROUP BY clause
--SQL Server Aggregate FunctionS
--1. AV... | true |
8d2bedc3bc30eab2dc6a8dcb687d86a7e59d0887 | SQL | Nabil-Chaouki/TDI205 | /Base de données/S2 - Langage SQL/P2 - Langage SQL/P10 - Partie 2 - Langage SQL/Groupe B/2.select -jointure/Loubna_Jaabak/jointure.sql | UTF-8 | 260 | 3.21875 | 3 | [] | no_license |
select *from Projets;
select p.id,p.titre,t.projet_id from Projets p inner join Tache t on p.id=t.projet_id;
select p.id,p.titre,t.projet_id,ts.tache_id from Projets p inner join tache t on p.id=t.projet_id inner join
tache_Stagiaire ts on t.id=ts.tache_id; | true |
f363bf906fa02fcb2f8b57131e5b6fd6aa383f08 | SQL | gtoonstra/etl-with-airflow | /examples/datavault-example/sql/starschema/load_fact_orderline.sql | UTF-8 | 738 | 3.390625 | 3 | [] | no_license | SELECT
so.create_dtm
, hp.product_id
, hc.customer_id
, ho.order_id
, -1
, sol.quantity
, sol.price
FROM
datavault.sat_orderline sol
INNER JOIN datavault.link_orderline lol ON sol.l_orderline_id = lol.l_orderline_id AND sol.is_current = TRUE
INNER J... | true |
bf3d589342bdfc1ad2d587a03019904e53cc7992 | SQL | JiajunLi229/sql-query-practice | /src/sqls/join_test_01.sql | UTF-8 | 691 | 3.578125 | 4 | [] | no_license | /*
* 请告诉我所有工作在法国(`France`)公司(`office`)的员工(`employee`)信息。查询结果应当包含如下
* 信息:
*
* +────────────+───────────+───────+
* | firstName | lastName | city |
* +────────────+───────────+───────+
*
* firstName 和 lastName 是员工的姓名,city 是办公室所在的城市。结果按照员工的 `employeeNumber`
* 排序。
*/
SELECT
`firstName`,
`lastName`,
`city`
... | true |
3656c80cba8c86f8c10eff71e8f5e9d4f3f6acbf | SQL | RDiasMartins/Atividades | /2020.10.23/musicplayer.sql | UTF-8 | 3,442 | 3.46875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.0.4.2
-- http://www.phpmyadmin.net
--
-- Máquina: localhost
-- Data de Criação: 17-Out-2020 às 00:47
-- Versão do servidor: 5.6.13
-- versão do PHP: 5.4.17
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... | true |
b968ec0ec0ac265ac6c8f7556d724ea0cfb51349 | SQL | yanaa11/DB-tasks | /task2/2-2.sql | UTF-8 | 232 | 3.578125 | 4 | [] | no_license | CREATE VIEW view22 AS
SELECT creator, date_part('month', start_date) as month, date_part('year', start_date) as year
FROM tasks;
SELECT count(creator), month, creator FROM view22
WHERE (year = 2015) GROUP BY month, creator; | true |
328159499fb5b56bb99fbb9405a39f674d469b7f | SQL | adityasonittyl/BestPractices | /projects/library management/libmgnt2.sql | UTF-8 | 3,501 | 3.109375 | 3 | [] | no_license | /*
SQLyog Enterprise - MySQL GUI v7.02
MySQL - 5.0.67-community-nt : Database - libmanagement2
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 *... | true |
f5887e1885fb94f82be8c78aeae0b5342be7c4c7 | SQL | angew74/Elezioni | /src/main/java/com/deltasi/elezioni/scripts/elezioni_voti_preferenze.sql | UTF-8 | 4,810 | 2.984375 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 8.0.13, for Win64 (x86_64)
--
-- Host: localhost Database: elezioni
-- ------------------------------------------------------
-- Server version 8.0.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*... | true |
f9b46c9b90d094e61523813787c4e456fce9b1e1 | SQL | upc2018-2019-3/Team8Proj | /8组-实训/数据库文件/db_jianzhi.sql | UTF-8 | 9,068 | 3.1875 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : 本地连接
Source Server Version : 50505
Source Host : localhost:3306
Source Database : db_jianzhi
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2019-02-21 12:52:39
*/
SET FOREIGN_KEY_CH... | true |
2455336d0e26a443980fbbc2416e5a8a804dd7ff | SQL | gl3n0n/TPJ_System | /Documents/WMS/barcode_suppliers.sql | UTF-8 | 1,325 | 3.125 | 3 | [] | no_license | set feedback off
set head off
set lines 312
set pages 0
col sql_text form a1024
spoo D:\systems\oracle\WSM\barcode_suppliers2.sql
select decode(supp_code,'exit', 'exit' || chr(10), '' ||
'set head off' || chr(10) ||
'set lines 256' || chr(10) ||
'set feedback off' || chr(10) ||
'set pages... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.